Support the ongoing development of Laravel.io →
Security Forms Validation
Last updated 1 year ago.
0

not sure how they could be posted multiple times? when you press submit on a form, the action="" takes effect and you go to a new page.. unless users browser is not responding/slow and they keep having to press submit multiple times OR are not using FORMS at all (through programming)... not sure how you would test to see which scenario is being played..

have you got CSRF token?

0

There is a short delay before the page is redirected, and I can click submit multiple times during this time. A user can easily double click the button while it is loading.

Yes, I'm using Blade's form and it generates a token automatically. I also do a before => csrf check for the store method as I'm using resource controllers.

0

It is not an issue specific to php.

I just disable the submit button when it is first clicked with Javascript

0

Is there a way to do this on the server side as well? If the user has Javascript turned off, wouldn't they be able to submit multiple times then?

0

Try adding a hidden filed with a random string or date and check if it was submitted multiple times within a certain amount of time from a certain ip or something like that...

0

Sign in to participate in this thread!

Eventy

Your banner here too?

adrielzxdf adrielzxdf Joined 13 Nov 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.