Live data from Hacker News

Google's XSS game

xss-game.appspot.com

111–120 of 168 posts

Re: Google's XSS game

#113
post #5

I completed the game, but I honestly don't know: why wouldn't inject a script tag directly in level 2 work?

Because you can't have tags inside of textarea. All data inside of textarea is interpreted as text.

Re: Google's XSS game

#116

Does anyone know how to submit corrections to Google? I've not been able to find a way after noticing a few mistakes on Google's XSS help page. There are a few examples using an image tag but the tags haven't been closed properly: https://www.google.com/about/appsecurity/learning/xss/index.... e.g. "Now, enter <img src='' onerror="alert(document.cookie);" and hit 'Share status!'."

Hey, thanks - it's a valid concern, though an important point (which isn't really well explained in the document) is that this payload will work even if the tag isn't properly terminated. One of the reasons for using such broken payloads is to demonstrate that browsers will happily parse broken markup and that approaches such as removing " " won't be effective as a technique to prevent XSS (because such a regexp won'…

Thank you for this explanation. It makes sense to me now as before I would have expected the "" approach to make it safe. It's a shame browsers are so resilient :)
Post reply on HN