Skip to content

CSRF is broken in Symfony 7.2 and newest Easy Admin Bundle. #6694

@tskorupka

Description

@tskorupka

Describe the bug
Wanted to use Symfony 7.2 with newest Easy Admin Bundle.

There is an issue with CSRF, or I just improperly set it up, csrf-token input field value is equal to csrf-token, does not get replaced with autogenerated value.

Funny thing is that, locally everything works just fine, prod environment is broken.

To Reproduce

  • New project of symfony 7.2 and easy admin bundle
  • Configure framework csrf protection
# ~/config/packages/csrf.yaml
# Enable stateless CSRF protection for forms and logins/logouts (login is enabled in security.yaml file.)
framework:
    form:
        csrf_protection:
            enabled: true
            token_id: submit

    csrf_protection:
        stateless_token_ids:
            - submit

(OPTIONAL) Additional context
Could not add, sorry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions