8000 Logout response includes two Set-Cookie headers for PHPSESSID · Issue #47228 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
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
Logout response includes two Set-Cookie headers for PHPSESSID #47228
Closed
@ghost

Description

Symfony version(s) affected

5.4.11, 6.1

Description

When investigating the headers sent upon logout in our application, I noticed that two Set-Cookie headers are included for PHPSESSID, e.g.:

PHPSESSID=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/; HttpOnly; SameSite=lax
PHPSESSID=deleted; expires=Sun, 08 Aug 2021 15:55:14 GMT; Max-Age=0; path=/; httponly; samesite=lax

We have our own UserProvider and Authenticator, but as you can see from the example application below this issue seems to be unrelated to that. It arises with json_login as well.

How to reproduce

To reproduce this I created a sample project and added a test that successfully runs through if upon logout two Set-Cookie headers with PHPSESSID=delete are sent: https://github.com/GiGaJKlein/symfony_two_cookies_issue

To run the test: ./bin/phpunit tests/TestForBug.php

Note: You may have to adjust the hashed hardcoded password in /config/pckages/security.yaml

Possible Solution

No response

Additional Context

No response

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

      0