dimanche 25 janvier 2015

Why were I able to "check" the "disabled" checkbox on the live site and the data was successfully uploaded to the server

So I just visited one site, where it had the "disabled" checkbox



<input type="checkbox" name="name" checked="checked" disabled="disabled">


It couldn't be checked via mouse, so I decided to uncheck it via jQuery. Opened the console and wrote:



$('input[name="name"]').attr('checked', false);


It got unchecked. I thought, well, maybe it's just for me unchecked, but server will still get data from it as if it's checked.


So I uploaded my form and to my surprise the server behaved as if checkbox was unchecked.


Why?





Aucun commentaire:

Enregistrer un commentaire