Skip to content
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

[SecurityBundle] Only register CSRF protection listener if CSRF is available #37047

Merged
merged 1 commit into from Jun 3, 2020

Conversation

wouterj
Copy link
Member

@wouterj wouterj commented Jun 1, 2020

Q A
Branch? 5.1
Bug fix? yes
New feature? no
Deprecations? yes
Tickets Fix #37033
License MIT
Doc PR -

I know we're not allowed to add new deprecations in already released versions. However, I don't think anyone is using SecurityBundle's compiler passes except from Symfony itself - so I don't think anyone is affected by this deprecation. The alternatives would be:

  • Add a new compiler pass in 5.1 that conditionally registers the CSRF listener
  • Do this exact change in 5.2 and...
    • accept a null argument in the listener for 5.1
    • or add this to the RegisterCsrfTokenClearingLogoutHandlerPass class in 5.1

@wouterj wouterj force-pushed the issue-37033/conditionally-load-csrf branch from c8fedc4 to 2d738b3 Compare June 1, 2020 16:30
@fabpot
Copy link
Member

fabpot commented Jun 3, 2020

Thank you @wouterj.

@fabpot fabpot merged commit d341254 into symfony:5.1 Jun 3, 2020
@wouterj wouterj deleted the issue-37033/conditionally-load-csrf branch June 3, 2020 08:11
@fabpot fabpot mentioned this pull request Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants