agar.io-clone
agar.io-clone copied to clipboard
Why no spaces or special chars in name?
So I have found a way to bypass it and allow players to use special chars in their names, but why is this added into the code in the first place. It would be nice to have the app itself allow players to use special chars in their names.
So I join the game with the name such as <script>for (var i = 0; i < 100000; i++) { alert('yo!'); }</script>
and the whole world got crashed :D
#XSS
The best approach to prevent XSS would be to escape the HTML entities from the name, instead of limiting the name itself. I believe the limitation is there to prevent people from using weird names with symbols and such, though I don't remember exactly.
Me too
Well for now since my thing is only private to me and my friends i will spare my time and work on making some scripts that stop xss from being a problem