如果你的验证服务器端? [英] Should you do validation on the server side?
问题描述
如果你在服务器端验证,还是确定只是做验证客户端上的?
Should you do validation on the server side, or is it ok to just do the validation on the client side?
@TheTXI
我很高兴你惊讶我只是不想留下任何东西了,可能潜在的改变一个人回答给我的虚假信息。
I am happy your amazed I just did not want to leave anything out that could potential change someone answer to give me false information.
这似乎很多人感动于我打算之后,但在阿贾克斯的一部分,应该已经保存在我的问题,因为这是最重要的部分。
It seems alot of people touched on what I was going after but the part of the Ajax should have been kept in my question as this was the most important part.
不过看完我知道看到一个坏的人可能只是很容易加载萤火虫,改变我的按钮,一个提交按钮,做一个职位的职位。或者一些其他的方式。
However reading the posts I know see that a bad person could just easily load up firebug and change my button to a submit button and do a post. Or some other way.
推荐答案
浏览器/客户端验证是方便。你不能依赖它。你绝对需要重复使用服务器端验证任何客户端级别的验证。
Browser/client-side validation is a convenience. You cannot rely on it. You absolutely need to duplicate any client-level validation with server-side validation.
这篇关于如果你的验证服务器端?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!