Skip to content

Html-escape the $currentStyleSheet variable#112

Open
ojensen5115 wants to merge 2 commits intomezzoblue:masterfrom
ojensen5115:patch-1
Open

Html-escape the $currentStyleSheet variable#112
ojensen5115 wants to merge 2 commits intomezzoblue:masterfrom
ojensen5115:patch-1

Conversation

@ojensen5115
Copy link

The $currentStyleSheet variable may be populated by a GET request parameter (?cssfile=foo) from the client, and is included without being escaped. As such, an XSS vulnerability can be triggered by simply closing the tag and including any arbitrary content or scripts.

http://www.csszengarden.com/?cssfile=http:%22%3E%3Cscript%3Ealert(%27hello%27)%3C/script%3E

I understand that content injection and XSS are not particularly important on a site like csszengarden.com, but I believe that this change is nonetheless an improvement.

Thank you for your consideration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant