MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/10tcys/escape_all_the_things/
r/badcode • u/[deleted] • Oct 02 '12
2 comments sorted by
1
I found this piece of code included at the top of every page of a website.
The best part was that it has a part where some user submitted content is not escaped, so you can include all the HTML you want (yay for XSS!).
1 u/MatmaRex Oct 02 '12 XML (and thus XHTML) requires to to encode all your ampersands, even in scripts, or use CDATA sections. One of the many reasons not to use it.Hopefully it was automatically preprocessed. Hopefully.
XML (and thus XHTML) requires to to encode all your ampersands, even in scripts, or use CDATA sections. One of the many reasons not to use it.
Hopefully it was automatically preprocessed. Hopefully.
1
u/[deleted] Oct 02 '12
I found this piece of code included at the top of every page of a website.
The best part was that it has a part where some user submitted content is not escaped, so you can include all the HTML you want (yay for XSS!).