Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Symfony 5.3: the csrf token is invalid on all form protected by CSRF when using "remember me"  #41707

Copy link
Copy link
Closed
@allan-simon

Description

@allan-simon
Issue body actions

Symfony version(s) affected: 5.3.1

Description

I've upgraded from Symfony 5.2 to 5.3.1 and since then, in production submitting any form protected by CSRF fail with

the csrf token is invalid. please try to resubmit the form

Even form not handle by me (for example I have EasyAdminBundle and they fail too)

How to reproduce

  1. Install Symfony + EasyAdminBundle
  2. for session I use
framework:
    session:
        handler_id: Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler
        cookie_secure: auto
        cookie_samesite: lax

3.login in EasyAdmin
4. try to submit a form -> you got the error

Possible Solution

Additional context

Is it related to #39919 ?

it happens only in production

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.