Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Merged
fabpot merged 1 commit intosymfony:6.2fromwouterj:security-logout-csrf
Jul 21, 2022

Conversation

@wouterj
Copy link
Member

QA
Branch?6.2
Bug fix?no
New feature?yes
Deprecations?no
Ticketsn/a
LicenseMIT
Doc PRtodo

In the new security system, enabling login CSRF protection was simplified toenable_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:

security:firewalls:main:logout:csrf_token_generator:security.csrf.token_generator

This PR introduced anenable_csrf option to make this equal to enabling login CSRF protection:

security:firewalls:main:logout:enable_csrf:true# when enabled, the default token generator will be used and# csrf_token_generator can be used to use a custom generator

The feature is fully backwards compatible without BC breaks (i.e. setting a token generator automatically enables CSRF).

@carsonbot
Copy link

Hey!

I think@TimoBakx has recently worked with this code. Maybe they can help review this?

Cheers!

Carsonbot

@fabpot
Copy link
Member

@wouterj Do you have time to finish this PR?

@wouterj
Copy link
MemberAuthor

Sorry, forgot about this one. Ready now :) (the remaining test failures are not related to this PR)

@fabpot
Copy link
Member

Thank you@wouterj.

@fabpotfabpot merged commit951352e intosymfony:6.2Jul 21, 2022
@wouterjwouterj deleted the security-logout-csrf branchJuly 21, 2022 11:44
@fabpotfabpot mentioned this pull requestOct 24, 2022
fabpot added a commit that referenced this pull requestNov 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/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
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@chalasrchalasrchalasr approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

6.2

Development

Successfully merging this pull request may close these issues.

4 participants

@wouterj@carsonbot@fabpot@chalasr

[8]ページ先頭

©2009-2025 Movatter.jp