Reputation: 4041
I have a form on my site where users can make new accounts. The "submit" button on the form is not a true submit button. It's an html type='button'
. when this is clicked I use the jquery:
('#form').submit();
to submit the form. If javascript is disabled, the form can't submit because the "submit" button is only a button and nothing happens. I was wondering if this type of security is truly secure or are there ways of still submitting this form?
Upvotes: 1
Views: 479
Reputation: 160953
User can change type='button'
to type='submit'
easily.
The true security comes from the server side.
Upvotes: 1
Reputation: 1235
NO. Relying on ANY client side (or lack there of) validation is never secure
Upvotes: 1
Reputation: 95062
You can still trigger the submit event by opening the console and typing
document.forms[0].submit()
Security on the client is never truly secure without help from server-side validation.
Upvotes: 2