I'm developing an HTML5 game using javascript and canvas, and I wonder how to protect it from the firefox scratchpad or any other script injection tools like it.
If any user can run its own code in mine, I really don't see how to prevent him from calling the onWin() method or modify its score to 1 billion and so on.
That's such a huge security breach that I'm now thinking about re-code it in flash or java.
What do you think ?
Regards.
Here is what you need to do: