htmlformsinspect-element

What if someone changes name of HTML form inputs


So I'm working on a website with various post forms, and I can't wrap my head around this: What if a user were to use inspect element to change the names of the html input tags so that my server-side application can't read the incoming data. Is there any way to prevent this or should I simply check whether the fields which I named myself do in fact exist and redirect the user in case my backend detects that the input forms have been tampered with?


Solution

  • No actually there is no way to avoid client to change request. and clients can create custom request for a attack to your apis. you have to validate request in server.