Skip to content

Navigation Menu

Sign in
Appearance settings

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

Remember Me on a lazy firewall causes refresh of cookie on every request #38206

Copy link
Copy link
Closed
@qurben

Description

@qurben
Issue body actions

Symfony version(s) affected: 5.1.5

Description

A firewall with lazy: true and remember me enabled will refresh the remember me token on every request, causing a CookieTheftException if multiple requests with the same remember_me cookie are sent.

Configuration must use PersistentTokenRememberMeServices

How to reproduce

https://github.com/qurben/symfony_issue_38206 If needed I can make a reproducer, but it is a bit involved as it also requires Doctrine or some database access.

Possible Solution

The remember me authenticator will already check the cookie and update it when supports is called. In a lazy configuration there is no token at this moment causing the remember em authenticator to check (and update) the cookie for each request.

It possibly should just check if the cookie exists, to give the ContextListener a chance to create a session and skip updating the cookie.

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.