Skip to content

CSRF question: Disable it for logged-in users as well? #1578

Discussion options

You must be logged in to vote

The very nature of a CSRF token validation is to protect against authenticated users doing things they shouldn’t.

A good quote from https://security.stackexchange.com/questions/2525/when-should-i-not-use-csrf-protection-for-a-form

As a rule of thumb: If data is modified with the permissions or context of the current user, you need the protection.

That why that config setting exists, as tokens are not really needed generally for things like contact forms by guests.

It entirely depends on the context of your forms, and what action they perform. For example if your form used an Element integration to create entries on form submission - that should be protected.

I’m hesitant to provide such…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mandrasch
Comment options

Answer selected by mandrasch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants