Firefox scratchpad and security

195 views Asked by At

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.

1

There are 1 answers

7
Falaque On

Here is what you need to do:

  • At server side you need to check only authorized user is able to update any data in server.
  • So if any update request is coming to server from client before updating you need to make sure the client is authorized to do so.