Skip to content

Session is not being created after upgrade to 5.4.1 #44546

Closed
@verng95

Description

@verng95

Symfony version(s) affected

5.4.1 or 6.0.1

Description

After upgrading to version 5.4.1/6.0.1, the session stopped working. As a result of the search, I realized that the problem was with this #44437, if you roll it back, it became normal.

How to reproduce

if framework.session.cookie_secure: auto is set, then:

  • https connections will create a session
  • http connections will not create a session

Possible Solution

File src/Symfony/Component/HttpKernel/EventListener/AbstractSessionListener.php Line 32:

If you replace this:

$sessionCookieWithId = sprintf('%s%s;', $sessionCookiePrefix, urlencode($sessionId));

On

$sessionCookieWithId = sprintf(' %s%s;', $sessionCookiePrefix, urlencode($sessionId));

That works correctly.

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