Reputation: 1
My application is a Spring MVC framework based. Using JSP for my form. Some users are modifying read-only fields of form by pressing F12 or by developer tools. How can I stop users from modifying readonly fields of my form? Actually, there are many forms and doing server-side validation by searching from the database at run time for those fields which are readonly in my form is not good for performance and a big task. I have found this issue recently and I want to understand how can I stop users from doing it. Thanks.
Upvotes: 0
Views: 573
Reputation: 47
Don't rely on the client.
That is, security on the client-side is not security.
Any security checks you do, or assumptions you make, on the client (aka HTML, javascript, etc) are irrelevant, and need to be performed on the server. When the user submits the form, simply disallow any values the user is not authorized to.
Upvotes: 1