I want to know is there any way to prevent elements of HTML form from changing on client side before submit (the elements they have value, like hidden elements)?
Lets say I have hidden elements. I want to make sure their values haven't been changed by user in purpose.
Or what is HTML FORM Security Best Practice?
No, there is no way to prevent the client from sending you arbitrarily manipulated or malformed requests. That's not just true for web apps, it's true for any app where you don't physically control the client.
Best practice is to expect that and deal with it. Specific mechanisms to do that include:
Generally, you should make sure that your system is robust enough to handle any sort of malicious input. Assuming that you've taken care of that, if you still need to make sure the information hasn't been tampered with, then use an HMAC. Your web library or programming language should have some sort of routine for this built in.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With