From b06f1ce2f7c3f7d5cb18fcce68c08a02cc1b271c Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 20 Nov 2024 12:55:27 +0100 Subject: [PATCH] Move stateless CSRF config to packages/csrf.yaml --- symfony/form/7.2/config/packages/csrf.yaml | 11 +++++++++++ symfony/form/7.2/manifest.json | 5 +++++ .../7.2/config/packages/framework.yaml | 5 ----- 3 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 symfony/form/7.2/config/packages/csrf.yaml create mode 100644 symfony/form/7.2/manifest.json diff --git a/symfony/form/7.2/config/packages/csrf.yaml b/symfony/form/7.2/config/packages/csrf.yaml new file mode 100644 index 000000000..40d40405e --- /dev/null +++ b/symfony/form/7.2/config/packages/csrf.yaml @@ -0,0 +1,11 @@ +# Enable stateless CSRF protection for forms and logins/logouts +framework: + form: + csrf_protection: + token_id: submit + + csrf_protection: + stateless_token_ids: + - submit + - authenticate + - logout diff --git a/symfony/form/7.2/manifest.json b/symfony/form/7.2/manifest.json new file mode 100644 index 000000000..e164c6e63 --- /dev/null +++ b/symfony/form/7.2/manifest.json @@ -0,0 +1,5 @@ +{ + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + } +} diff --git a/symfony/framework-bundle/7.2/config/packages/framework.yaml b/symfony/framework-bundle/7.2/config/packages/framework.yaml index b4c42bd18..7e1ee1f1e 100644 --- a/symfony/framework-bundle/7.2/config/packages/framework.yaml +++ b/symfony/framework-bundle/7.2/config/packages/framework.yaml @@ -8,11 +8,6 @@ framework: #esi: true #fragments: true - # Enable stateless CSRF protection for forms and logins/logouts - form: { csrf_protection: { token_id: submit } } - csrf_protection: - stateless_token_ids: [submit, authenticate, logout] - when@test: framework: test: true