-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hey! I think @TimoBakx has recently worked with this code. Maybe they can help review this? Cheers! Carsonbot |
fabpot
reviewed
Jun 5, 2022
src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php
Show resolved
Hide resolved
@wouterj Do you have time to finish this PR? |
568d1c4
to
df7f680
Compare
df7f680
to
380fe72
Compare
Sorry, forgot about this one. Ready now :) (the remaining test failures are not related to this PR) |
chalasr
approved these changes
Jul 21, 2022
fabpot
approved these changes
Jul 21, 2022
Thank you @wouterj. |
Merged
fabpot
added a commit
that referenced
this pull request
Nov 26, 2022
… 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/A The 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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_csrf
option 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).