admin管理员组文章数量:1391977
I know that Javascript is an incredibly unsecure way of programming a persistent game, where for instance you are doing battle calculations in an RPG and then award XP through linking to a PHP page when they win that adds XP to a database (since the player could make their own javascript to always win or just look at the PHP page that you get sent to when you win and just go there anyway).
So with that said, I'm wondering if HTML5 makes multiplayer/persistent games any safer in this regard, since I know it still uses Javascript. Or am I still doomed to rely entirely on server-side scripting for doing any calculations that award the player?
I know that Javascript is an incredibly unsecure way of programming a persistent game, where for instance you are doing battle calculations in an RPG and then award XP through linking to a PHP page when they win that adds XP to a database (since the player could make their own javascript to always win or just look at the PHP page that you get sent to when you win and just go there anyway).
So with that said, I'm wondering if HTML5 makes multiplayer/persistent games any safer in this regard, since I know it still uses Javascript. Or am I still doomed to rely entirely on server-side scripting for doing any calculations that award the player?
Share Improve this question edited Sep 29, 2010 at 16:34 Mike Wills 21.3k29 gold badges97 silver badges152 bronze badges asked May 6, 2010 at 23:58 Sean MadiganSean Madigan 433 bronze badges4 Answers
Reset to default 8Anything that's not on the server is inherently insecure. After all, it only takes a telnet connection and the user can send literally anything they want to your server.
In short, you can't trust anything sent from the client, so the answer is yes - you gotta do the work on the server side.
Unfortunately, HTML5 doesn't change these basic properties in any way. So no, you have to do it all server-side.
No matter what the game, whether JS or native binary, if the scoring system is vulnerable, people will tamper if the game is good enough. Stick to clever serverside every time.
本文标签: phpDoes HTML5 make Javascript gaming safer (more secure)Stack Overflow
版权声明:本文标题:php - Does HTML5 make Javascript gaming safer (more secure)? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744756455a2623493.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论