开发者

Using Client Side Scripts for validations?

开发者 https://www.devze.com 2023-02-24 06:50 出处:网络
I\'m making an asp.net/c# web application and i would like to know is开发者_开发知识库 Client Side Scripts for validations enough and secure using js ? what do you think and what do you suggest ?

I'm making an asp.net/c# web application and i would like to know is开发者_开发知识库 Client Side Scripts for validations enough and secure using js ? what do you think and what do you suggest ? thanks


Client Side Scripts for validations enough and secure using js ?

No, client side validation only is not secure enough as users can disable javascript. You need to perform at least server side validation. Client side validation is only for convenience, avoid sending values to the server and preserve bandwidth, responsiveness of the UI, ... but not for security.


Using client side scripting for this is essentially asking the client to check that the user who controls the client isn't doing anything bad.

It is very convenient for users who did bad things by accident but no defense at all against users trying to do bad things deliberately.

Do all your checks server side, then consider adding extra client side checks to speed things up for the users.


You can't rely on these as users can simply turn off Javascript. ALWAYS PERFORM SERVER SIDE VALIDATION!!!

0

精彩评论

暂无评论...
验证码 换一张
取 消