Different sites served from the same domain share the session cookie name

Created on 4 July 2018, over 6 years ago
Updated 27 August 2024, 4 months ago

Problem/Motivation

Two different Drupal installations on the same domain share the same session cookie name. This can be tested by serving the different installations over different ports.
This leads to being logged out of both when trying to login into them and is probably generally not a good idea to share a session cookie name between different sites.

Proposed resolution

Use the hash salt as a key for hash_hma ccreate the session name would create unique names for different sites.

Remaining tasks

Decide if we want to make this behaviour optional for existing sites.

User interface changes

None

API changes

New argument to \Drupal\Core\Session\SessionConfiguration::__construct() - deprecation in place.

Data model changes

None

Release notes snippet

Session names have changed. The hash is now created using the hash salt. This ensures that different Drupal sites on the same domain have different session names.

πŸ› Bug report
Status

Needs review

Version

11.0 πŸ”₯

Component
User systemΒ  β†’

Last updated about 10 hours ago

Created by

πŸ‡©πŸ‡ͺGermany daniel.bosen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024