Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can a form with a disabled <input type="submit"> be hacked to submit anyway?

I'm just curious about the security of the <input type="submit" /> tag.

If I have a form (with method="post") with just one "Submit" button, which is disabled, and I haven't written any JS/AJAX/jQuery that affects the form, the button, or its other contents, could someone still find a way to submit the form?

Here's the code for a form along the lines I'm talking about:

<form method="post" action="processor.php" enctype="multipart/form-data">
<input type="text" name="foo" value="bar" />
<input type="submit" value="Submit" disabled="disabled" />
</form>

Thanks much!

like image 403
RobertAKARobin Avatar asked Dec 03 '13 18:12

RobertAKARobin


1 Answers

Yes, I don't even need your form to submit it. I can use cURL or a similar library to just send a POST request as if it came from a form.

Always validate everything server-side, you don't always get what you expect.

like image 145
Madara's Ghost Avatar answered Oct 20 '22 06:10

Madara's Ghost