javascript - Preventing post data forgery -


supose have js game, score , "publish score" button. button send post request php script , script add score database. thing is, user can see in browser page app sending post data, hence can forge sending number can come with. crsf, token won't help, because user can see too. i've been thinking problem while , haven't came 100% working solution.

everything on client can't trusted.

i'd try add own little encryption can reversed me. guess basic displaying numbers chars, 1 = f, 2=p, etc... , adding random junk make string asdzf7erwhbrdfm0[encryptedscore]0jkfsdgfadsegajband removing between zeroes.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -