Skip to content

fix(lib): rename cookies based on settings - #1798

Merged
Xe merged 1 commit into
mainfrom
Xe/cookie-name-based-on-settings
Aug 4, 2026
Merged

fix(lib): rename cookies based on settings#1798
Xe merged 1 commit into
mainfrom
Xe/cookie-name-based-on-settings

Conversation

@Xe

@Xe Xe commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Cookies are horrible: a rant by Xe Iaso.

Cookies are horrible. When cookies are sent from server to client, they include a number of settings that I mistakenly let administrators control. Turns out that when the browser stores them, they uniquely identify cookies by the combination of both name and settings. These settings are not sent back to the server upon requests. As a result, if any administator changes any cookie setting without changing the cookie name, the client sends two cookies. This is not good because the server tries to clear the errant cookie, but the client discards that because it doesn't match what the server sent.

To fix this, cookies are now dynamically renamed based on cookie settings. This behaviour cannot be disabled.

Ref: #1797
Ref: #1701

Checklist:

  • Added a description of the changes to the [Unreleased] section of docs/docs/CHANGELOG.md
  • Added test cases to the relevant parts of the codebase
  • Ran integration tests npm run test:integration (unsupported on Windows, please use WSL)
  • All of my commits have verified signatures

Cookies are horrible: a rant by Xe Iaso.

Cookies are horrible. When cookies are sent from server to client, they
include a number of settings that I mistakenly let administrators
control. Turns out that when the browser stores them, they uniquely
identify cookies by the combination of both name and settings. These
settings are not sent back to the server upon requests. As a result, if
any administator changes any cookie setting without changing the cookie
name, the client sends two cookies. This is not good because the server
tries to clear the errant cookie, but the client discards that because
it doesn't match what the server sent.

To fix this, cookies are now dynamically renamed based on cookie
settings. This behaviour cannot be disabled.

Ref: #1797
Ref: #1701
Signed-off-by: Xe Iaso <[email protected]>
@Xe Xe self-assigned this Aug 4, 2026
@Xe
Xe merged commit 65a894c into main Aug 4, 2026
24 checks passed
@ThiefMaster

Copy link
Copy Markdown

Including the hash in the cookie name breaks the advanced haproxy setup since it's now no longer (easily) possible to know what cookie to look for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants