[7.x-1.x] Add typical Drupal cookie names to whitelist to prevent erasure / incompatibility with anonymous flags

Created on 2 September 2020, over 4 years ago
Updated 20 April 2025, 29 days ago

Problem/Motivation

Widely used modules like "Flags" and "Session API" use Cookies for anonymous and authenticated users.
Even if cookie-agreed is "2", they are whiped, which causes headache for developers because the module functionality is broken by eu_cookie_compliance.

Steps to reproduce

Install Session API and Flags
Use a non-global flag to flag a node and allow for anonymous users
Flag as anonymous user
Reload the page several times and see that your flag is lost because the cookie is erased

Try the same with EU Cookie Banner disabled and everything works fine.

I guess this only happens for unauthenticated users, but I'm not 100% sure

Proposed resolution

Add the following cookie names to the whitelist by default

  • Session API: "session_api_session"
  • Flags: "flags"

Remaining tasks

  1. Discuss
  2. Plan
  3. Solve

User interface changes

None

API changes

None

Data model changes

None

Feature request
Status

Closed: won't fix

Version

1.0

Component

Code

Created by

🇩🇪Germany Anybody Porta Westfalica

Live updates comments and jobs are added and updated live.
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.

  • 🇳🇿New Zealand atowl

    Hi All,

    Since there has been no movement on this issue in 4 years, i am going to mark this as closed [won't fix]

    Please feel free to open this again if it still an issue

Production build 0.71.5 2024