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

Delete session cookie samesite 3.x #3861

Merged
merged 1 commit into from
Dec 6, 2021
Merged

Conversation

rnewson
Copy link
Member

@rnewson rnewson commented Dec 6, 2021

Overview

DELETE /_session does not work if the SameSite attribute is enabled when using browsers that enforce it because we forgot to add the property when deleting the cookie. This PR adds the SameSite attribute if enabled.

Testing recommendations

Enable SameSite, login via the dashboard, then log out. Observe that the AuthSession cookie has a value before log out but not after.

Related Issues or Pull Requests

Checklist

@rnewson rnewson merged commit 86facac into 3.x Dec 6, 2021
@rnewson rnewson deleted the delete-session-cookie-samesite-3.x branch December 6, 2021 14:28
@nickva
Copy link
Contributor

nickva commented Dec 6, 2021

Would this also apply when we clear the session on a failed login in

% clear the session
Cookie = mochiweb_cookies:cookie(
"AuthSession", "", [{path, "/"}] ++ cookie_scheme(Req)
),

@rnewson
Copy link
Member Author

rnewson commented Dec 8, 2021

eep, yes. will make new PR's. good catch.

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.

None yet

3 participants