E
E
Emil Revencu2016-03-10 16:35:41
JavaScript
Emil Revencu, 2016-03-10 16:35:41

How to prevent HTML code from being changed through the Browser?

There are buttons on the site with the DISABLED attribute.
If you go to the browser (in my case, Chrome) on "View Code" and manually change this DISABLED (remove it), then clicking on the button becomes active and you can perform the actions of this button.
How to prevent these actions?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
T
Taras Serevann, 2016-03-10
@Taras_Serevann

No way. Everything that is in the browser (client) or comes from it to the server can be changed or faked. Therefore, all data received from the client must be additionally filtered and checked on the server side.

T
ThunderCat, 2016-03-10
@ThunderCat

Perhaps this will surprise you, but not only disabled can be changed, all data in the fields can be (and sooner or later most likely will be) changed and sent to the server. Everything that comes from the user must be checked.

A
Andrey Pike, 2016-03-10
@AndyPike

When you click your submit "disabled", recheck everything, if it fails, trigger a failure, and disable your button again. It's from Chrome, for example.
We have already written about processing on the server, this is a must.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question