html5 - Stop user's executing JavaScript from console -
i've been mucking around creating little multiplayer game using html5 technologies. used node.js , socket.io manage server-side business.
my problem lies in users being able enter in own javascript through chrome console (and various other consoles im sure). example, user might enter console:
socket.emit("new player", {user: username, x: localplayer.getx(), y: localplayer.gety()});
this add new player game. best way should go stopping this? there way can catch these entries , simple deny them (followed slapping user around face)? if stop them editing things gui changing variables, eg:
gamestatus = "trolled lol troll client-side editing lol";
thanks, joel
you cannot that.
you can never trust comes client.
if somehow affect console page, attacker write own web browser (read: fork chromium) , bypass restrictions.
or attacker handcraft http requests without browser @ all.
instead, need validate on server.
whenever client something, server needs check whether client allowed that.
Comments
Post a Comment