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

[Security] Fixed handling of CSRF logout error #36974

Merged

Conversation

wouterj
Copy link
Member

@wouterj wouterj commented May 26, 2020

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

8 years ago, a typo was made while refactoring the ExceptionListener, loosing this logic (46071f3). I think we should fix it.

The LogoutException is a very generic name for something only used when the CSRF token is invalid. Should we match the exception message to make sure only this CSRF error is transformed into 403? I didn't yet do it because any usage of LogoutException would have resulted in 500, which always is worse than 403.

@wouterj wouterj force-pushed the issue-36814/handle-logout-csrf-exception branch from 69be9fe to 50348f2 Compare May 26, 2020 15:30
@chalasr chalasr added this to the 3.4 milestone May 26, 2020
@chalasr
Copy link
Member

chalasr commented May 26, 2020

Thank you @wouterj.

@chalasr chalasr merged commit ce61bb0 into symfony:3.4 May 26, 2020
@wouterj wouterj deleted the issue-36814/handle-logout-csrf-exception branch May 26, 2020 16:18
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

4 participants