From 1933234ed422bf89b5ad71094ffb791f692251d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sun, 13 Jul 2025 16:29:27 +0200 Subject: [PATCH] Updated symfony form recipe --- config/packages/csrf.yaml | 11 +++++++++++ symfony.lock | 11 ++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 config/packages/csrf.yaml diff --git a/config/packages/csrf.yaml b/config/packages/csrf.yaml new file mode 100644 index 00000000..40d40405 --- /dev/null +++ b/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.lock b/symfony.lock index 44053dc7..744a4fbe 100644 --- a/symfony.lock +++ b/symfony.lock @@ -484,7 +484,16 @@ ] }, "symfony/form": { - "version": "v4.2.3" + "version": "7.3", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "7.2", + "ref": "7d86a6723f4a623f59e2bf966b6aad2fc461d36b" + }, + "files": [ + "./config/packages/csrf.yaml" + ] }, "symfony/framework-bundle": { "version": "6.4",