Re:Google's XSS game
by tieTYT on Thursday May 29, 2014 @12:56PM
(#7817188)
I probably should be too embarrassed to ask this question, but why can't I use script tags in the second test? I don't understand what's preventing me from doing that.
[ Parent
| on HN ]
Re:Google's XSS game
by nickmccann on Thursday May 29, 2014 @01:07PM
(#7817262)
The second question disallows the script tag.
How is it doing that?
Using <script> ... as a payload won't work because the browser won't execute scripts added after the page has loaded.
The browser smartly won't execute scripts added through innerHTML, but it probably should be noted that jquery's html() method will[0]. There's always a way to shoot yourself in the foot. :)