Allow for custom suffixes to session name suffix

Created on 23 June 2014, about 10 years ago
Updated 7 June 2024, 20 days ago

Problem/Motivation

This issue is motivated by the need for having several drupal websites across multiple subdomains, and wanting to share session information between some of them.

For example, if we have two sites: siteA and siteB, spanning the following subdomains:

SiteA:

  • sub1.example.com
  • sub2.example.com
  • sub3.example.com

SiteB:

  • sub4.example.com
  • sub5.example.com

We want users to share their session between the subdomains for SiteA, and independently, to have the same session for all subdomains of SiteB, but not having the sessions interfering between them.

Proposed resolution

The proposed solution involves, in this example, to set the cookie_domain to '.exaple.com' and to allow users to configure a custom session name prefix, so that SiteA and SiteB have different session names.

This will let users set $conf['session_name_suffix'] to SITEA and SITEB respectively, and manage two independent sessions.

Remaining tasks

The patch here adds both the code needed to achieve this behavior and sample code for default.settings.php.

Automated tests still need to be added.

User interface changes

No UI changes.

API changes

It is now possible to set $conf['session_name_suffix'] in settings.php and the configured string will be added at the end of the session name.

✨ Feature request
Status

Needs work

Version

7.0 ⚰️

Component
BootstrapΒ  β†’

Last updated 8 days ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States lucascaro

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

  • Needs change record

    A change record needs to be drafted before an issue is committed. Note: Change records used to be called change notifications.

Sign in to follow issues

Comments & Activities

Not all content is available!

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

  • πŸ‡ΈπŸ‡°Slovakia poker10

    Thanks for working on this.

    Adding a related D10 issue. This is still Needs work, as the tests are missing. We can inspire with the D10 code if/where possible.

Production build 0.69.0 2024