Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change cookie key in CE #4621

Merged
merged 2 commits into from
Sep 26, 2024
Merged

Change cookie key in CE #4621

merged 2 commits into from
Sep 26, 2024

Conversation

ruslandoga
Copy link
Contributor

@ruslandoga ruslandoga commented Sep 25, 2024

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
Copy link

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
12 checks passed
@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