Created
July 28, 2011 23:32
-
-
Save mhulse/1112815 to your computer and use it in GitHub Desktop.
CSP includes and query string variables...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <csp:include page="/csp/cms/sites/web/demos/test1.inc.csp?var=foo"> | |
| #($get(%request.Data("var", 1)))# | |
| ...... | |
| Output is: | |
| foo foo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #($get(%request.Data("var", 1)))# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| The fix is to kill the %request variable: | |
| #($get(%request.Data("var", 1)))# | |
| do stuff with "var". | |
| #[ kill %request.Data("var") ]# |
Author
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Docs here: http://tinyurl.com/3p3gjjw