Skip to content

Change cookie key in CE - #4621

Merged
ruslandoga merged 2 commits into
masterfrom
change-cookie-key-in-ce
Sep 26, 2024
Merged

Change cookie key in CE#4621
ruslandoga merged 2 commits into
masterfrom
change-cookie-key-in-ce

Conversation

@ruslandoga

@ruslandoga ruslandoga commented Sep 25, 2024

Copy link
Copy Markdown
Contributor

Fix for #4618 (reply in thread)

What is happening (probably):

  • after POST /login browsers store two cookies, legacy-session one for .<domain> and new-session one for <domain> for the same key
  • (some?) browsers put legacy-session cookie first in the cookie header
  • Plug uses maps, so only one _plausible_prod cookie gets in, and in the current implementation, it's the first one that appears in the cookie header
  • if legacy-session cookie ends up in the session map, auth plugs fail and redirect back to /login

This PR just changes the cookie key to _plausible_key so that there wouldn't be any conflicts.

@ruslandoga
ruslandoga requested a review from a team September 25, 2024 16:33
@ruslandoga
ruslandoga force-pushed the change-cookie-key-in-ce branch from 1161e61 to f6b2ad5 Compare September 25, 2024 16:42
@ruslandoga ruslandoga changed the title Use default sessions options in CE Change cookie key in CE Sep 25, 2024
@zoldar zoldar added the preview label Sep 26, 2024
@github-actions

Copy link
Copy Markdown
Preview environment👷🏼‍♀️🏗️
PR-4621

@ruslandoga
ruslandoga added this pull request to the merge queue Sep 26, 2024
Merged via the queue into master with commit 356f50e Sep 26, 2024
@ruslandoga
ruslandoga deleted the change-cookie-key-in-ce branch September 26, 2024 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants