-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Form::open() should add hidden field with csrf token if csrf_autoload = true #1171
Comments
That doesn't really help much, as this config key does autoload, not autovalidate. |
@WanWizard An auto-validate option would be a great addition. |
That would cause an exception where you won't be able to catch it (other then perhaps in your index.php), I'm not sure that is desirable. |
Auto validation has been fixed in 1.6/develop, and will now throw a SecurityException if the token is missing or doesn't validate. You'll have to catch this in your index.php if you want to handle it gracefully. Note that this requires that ALL your POST requests contain the token, both form and json posts! |
Continue here: fuel/fieldset#6 |
At the moment csrf_autoload in main config.php seemes to be useless, beacause you have to add the csrf token to view manually.
The text was updated successfully, but these errors were encountered: