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

Use Security::logout() instead of redirecting to the logout url #1467

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

GromNaN
Copy link
Member

@GromNaN GromNaN commented Dec 4, 2023

Proposition from @chalasr: symfony/symfony#52833 (comment)

The logout URL generator should be used to create links with CSRF protection. In this case, the action is already secured by the form, the redirection is not necessary.

@GromNaN GromNaN requested a review from javiereguiluz December 4, 2023 19:10
@javiereguiluz javiereguiluz merged commit 9ac2900 into symfony:main Dec 11, 2023
6 of 7 checks passed
@javiereguiluz
Copy link
Member

Jérôme, thanks a lot for this. I love the simplification introduced here 🙌

Thanks also to Robin for originally proposing this idea and for reviewing this.

@GromNaN GromNaN deleted the security-logout branch December 11, 2023 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants