Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[SecurityBundle] Add shortcut option to enable logout CSRF protection#46580
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
carsonbot commentedJun 5, 2022
Hey! I think@TimoBakx has recently worked with this code. Maybe they can help review this? Cheers! Carsonbot |
src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.phpShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
@wouterj Do you have time to finish this PR? |
Sorry, forgot about this one. Ready now :) (the remaining test failures are not related to this PR) |
Thank you@wouterj. |
… value (MatTheCat)This PR was merged into the 6.2 branch.Discussion----------[SecurityBundle] Fix `logout.csrf_token_generator` default value| Q | A| ------------- | ---| Branch? | 6.2| Bug fix? | yes| New feature? | no| Deprecations? | no| Tickets |Fix#48339| License | MIT| Doc PR | N/AThe token **manager** service ID configuration node is called <code>csrf_token_**generator**</code>. As such it has been wrongly assumed in#46580 `security.csrf.token_generator` was a good default value, whereas `security.csrf.token_manager` should be used (this is reflected by [the documentation](https://symfony.com/doc/current/reference/configuration/security.html#csrf-token-generator)).`csrf_token_generator` should ideally be deprecated and renamed `csrf_token_manager`.Commits-------df539e2 [SecurityBundle] Fix `logout.csrf_token_generator` default value
In the new security system, enabling login CSRF protection was simplified to
enable_csrf: true, but we didn't change enabling logout CSRF protection. This means that users have to set some very low level configuration options to enable logout CSRF:This PR introduced an
enable_csrfoption to make this equal to enabling login CSRF protection:The feature is fully backwards compatible without BC breaks (i.e. setting a token generator automatically enables CSRF).