kirby
kirby

Reputation: 4041

Is using jquery form submit without php secure enough

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

Answers (3)

xdazz
xdazz

Reputation: 160953

User can change type='button' to type='submit' easily.

The true security comes from the server side.

Upvotes: 1

Law Metzler
Law Metzler

Reputation: 1235

NO. Relying on ANY client side (or lack there of) validation is never secure

Upvotes: 1

Kevin B
Kevin B

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

Related Questions