-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
Add support for SameSite=None #89
Conversation
Nice! Now that |
On the one hand, SameSite defaults to None if unspecified, but on the other, the tests currently expect false to not set a value making changing false a backwards incompatible change. With every other flag, coincidentally or not, it looks to me like setting the option to false prevents the flag from being added. I’m not sure I see much benefit to changing that behaviour? |
Well, the spec is a draft and changes were always expected until it was finalized. It's more of a question here, for those most familiar with the spec and what one would expect. Like if a user passed in Remember that the sameSite was added to this module with there was no None option, so how it works now did not take into consider a None possibly. |
So taking a look through the updated specification, it looks like if the attribute is not set, then it is specified to act the same as if it was
|
And the specification's changelog links to the following GitHub issue, which also says a missing |
The above is research into answering what |
So, yes - I agree that a |
Hi @rowan-m . I was just updating your PR :D . The idea I had when I called out As far as impact, there are a few things that work in our favor here:
I can also update the |
So I've also been thinking about @LouisStAmour 's point where So I think, in the end, especially if this just eases landing, I'm leaning towards just keeping this PR as-is. Any yays / nays ? |
So as stated earlier, my preference is to leave the PR as-is. The only reason I would consider changing it is if the spec more strongly encouraged implementors to set a SameSite value. But adding a value of None isn’t technically a deprecation or warning of the previous default behaviour, so I see no reason to change at this time. And if the default changes in future, keeping the existing behaviour is still valid for this library, it just produces a cookie that will be interpreted differently. If this were reading the property, I would consider returning a default value of “None” but there’s a difference between assembly/parsing and interpretation. If we keep the library as strictly assembly/parsing, then we shouldn’t make assumptions about interpretation that might change in future. |
Makes sense to me. Enables developers to use the new value now, doesn't change any existing behaviour. |
closes #89
Included in the 0.4.0 release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Landed 🎉
Add support for the
None
value for theSameSite
attribute as per https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03