-
-
Notifications
You must be signed in to change notification settings - Fork 496
[Turbo] Fix check_header
configuration
#1439
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
Thanks for the PR 😍 How to test these changes in your application
Diff between recipe versionsIn order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes. symfony/ux-turbo2.19 vs 2.20diff --git a/symfony/ux-turbo/2.19/manifest.json b/symfony/ux-turbo/2.20/manifest.json
index 1fa03bf..ec536fb 100644
--- a/symfony/ux-turbo/2.19/manifest.json
+++ b/symfony/ux-turbo/2.20/manifest.json
@@ -1,5 +1,18 @@
{
"bundles": {
"Symfony\\UX\\Turbo\\TurboBundle": ["all"]
- }
+ },
+ "aliases": ["turbo"],
+ "conflict": {
+ "symfony/framework-bundle": "<7.2",
+ "symfony/security-csrf": "<7.2"
+ },
+ "add-lines": [
+ {
+ "file": "config/packages/csrf.yaml",
+ "position": "after_target",
+ "target": " csrf_protection:",
+ "content": " check_header: true"
+ }
+ ]
} |
Not sure if this is the right place but I have an error that maybe related to that PR
Manually fixing indentation give an other error :
Commenting/Removing the |
Hum, that's because I don't see any solution that does not involve to modify Flex. Instead:
# Enable stateless CSRF protection for forms and logins/logouts
framework:
form:
csrf_protection:
check_header: true
token_id: submit
csrf_protection:
# To enable with UX Turbo
# check_header: true
stateless_token_ids:
- submit
- authenticate
- logout
|
Opened #1439 |
Since b06f1ce, the (stateless) CSRF configuration now lives in
config/packages/csrf.yaml
file:Some spaces from
target
andcontent
were removed since we want to addcheck_header: true
forframework.csrf_protection
configuration , which is one-level underframework.form.csrf_protection