Skip to content

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

@allan-simon

Description

@allan-simon

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy