-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] Automatically enable the CSRF protection if CSRF manager exists #25151
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
Conversation
Travis failure is not related :) |
Thank you @sroze. |
… if CSRF manager exists (sroze) This PR was merged into the 3.4 branch. Discussion ---------- [FrameworkBundle] Automatically enable the CSRF protection if CSRF manager exists | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | ø | License | MIT This will automatically enable the CSRF protection if `CsrfTokenManagerInterface` exists. Commits ------- fd43406 Automatically enable the CSRF protection if CSRF manager exists
This PR was merged into the 3.4 branch. Discussion ---------- Fixing wrong class_exists on interface | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | none | License | MIT | Doc PR | symfony/symfony-docs#8873 already does not mention changing anything in the config This was a bug introduced in #25151 on the 3.4 branch. It's... pretty self-explanatory I hope :). Cheers! Commits ------- be75bd9 Fixing wrong class_exists on interface
Is this really a good idea? |
Auto-enabling CSRF without it working because session are not enabled, sounds like a bad DX
How about only enabling it when session is enabled as well? Or even better, we implement #13464 |
I'm going to revert this change as it was broken anyway before the fix today, so it never worked. That will give us some time to implement it properly. |
This will automatically enable the CSRF protection if
CsrfTokenManagerInterface
exists.