diff --git a/config/packages/csrf.yaml b/config/packages/csrf.yaml new file mode 100644 index 0000000000..40d40405e1 --- /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 8f7cc4cf2a..a0101cb42f 100644 --- a/symfony.lock +++ b/symfony.lock @@ -409,7 +409,16 @@ ] }, "symfony/form": { - "version": "v5.2.0" + "version": "7.2", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "7.2", + "ref": "7d86a6723f4a623f59e2bf966b6aad2fc461d36b" + }, + "files": [ + "config/packages/csrf.yaml" + ] }, "symfony/framework-bundle": { "version": "7.2",