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

SameSite is not set in the default path #256

Closed
martinlindhe opened this issue Feb 23, 2022 · 2 comments · Fixed by #276
Closed

SameSite is not set in the default path #256

martinlindhe opened this issue Feb 23, 2022 · 2 comments · Fixed by #276
Labels

Comments

@martinlindhe
Copy link

The SameSite patch in #165 and #170 forgot to initialize SameSite to a value in the default path.

I think the intent was to initialize it to http.SameSiteDefaultMode.

Currently this results in the following error in Firefox Developer Tools

Cookie “id” will be soon rejected because it has the “SameSite” attribute set to “None” or an invalid value, without the “secure” attribute. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite
@martinlindhe martinlindhe changed the title [bug] [bug] SameSite is not set in the default path Feb 23, 2022
@stale
Copy link

stale bot commented Apr 27, 2022

This issue has been automatically marked as stale because it hasn't seen a recent update. It'll be automatically closed in a few days.

@stale stale bot added stale and removed stale labels Apr 27, 2022
@coreydaley coreydaley changed the title [bug] SameSite is not set in the default path SameSite is not set in the default path Jul 16, 2023
@coreydaley coreydaley moved this to 📋 Backlog in Gorilla Web Toolkit Aug 25, 2023
@bharat-rajani
Copy link
Member

bharat-rajani commented Apr 21, 2024

@martinlindhe The http.SameSiteDefaultMode would still result in cookie being dropped because default mode will not add SameSite.

I am leaning towards defaulting SameSite to http.SameSiteLaxMode inside cookie store initializer (NewCookieStore). Along with this it should be clearly documented through an example that this option is configurable.

References for my above opinions:

Expired draft: https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-same-site-00#section-3.1
Currenty active: https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis-05#section-4.1.1

@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Gorilla Web Toolkit Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants