Jump to content

Node Server Protection For Web Game?


Recommended Posts

I am writing my own web game as I learn web programming.
For the next version I am moving most the code to a server.
This is the first time I am writing a server from scratch.

Using a Node server with Express and Sockets stacked in as the frame work.

What are tricks I can use to prevent malicious players from hacking the server?

Right now I am enclosing all incoming data in {} brackets and nothing gets ran without a 'typeof' verification that it is of the correct datatype.
No functions are being passed as data types so anything that returns as a typeof == 'function' gets scrapped.

Only after code that passes all my verifications and gets through proper processing returning the correct type of data gets transferred out of the {} fields.

 

Link to post
Share on other sites
  • 2 months later...
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...