1

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?

2
  • You're considering this secure? Commented Jan 18, 2012 at 3:24
  • You don't have any security at all. Submitting a form has no special meaning. Anyone can still send you any HTTP POST or HTTP GET request they want. Commented Jan 18, 2012 at 3:25

3 Answers 3

2

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.

Sign up to request clarification or add additional context in comments.

3 Comments

you could even create a new form, move the input elements from the old form to the new one you created, append to body, and submit, bypassing all submit events you could possibly define on the other form.
are you saying the user can write his/her own html on top of mine?
Yes, anything you can do with html/css/javascript, the client can do.
1

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

Comments

1

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

The true security comes from the server side.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.