fix: secure='auto' and sameSite='none' case - #817
Closed
simllll wants to merge 1 commit into
Closed
Conversation
if secure is set to `auto` and sameSite is set to `none` it can result into secure is set to false, and therefore the cookie will not be set. Because sameSite none always needs a secure context. This fixes this behaviour, in case secure evaluates to false and sameSite is set explicitly to none, sameSite will be removed.
Contributor
|
See discussion in #725 |
Author
|
Sorry i missed that, still don't really follow the reasoning because secure has a auto flag, why samesite shouldn't benefit from that too... ;) But when I find time i will add a comment on the other thread. Thanks for pointing me to it :)! |
Contributor
|
The issue is these two settings control completely different behaviors. Beaides that, if you need a samesite none cookie, how can your aite possibly work when the cookie is now lax or strict? It would reason that if you site does indees work with a strict or lax cookie, that is what you should be using and not none. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
if secure is set to
autoand sameSite is set tononeit can result into secure is set to false, and therefore the cookie will not be set.Because sameSite none always needs a secure context.
This fixes this behaviour, in case secure evaluates to false and sameSite is set explicitly to none, sameSite will be removed.
related to #778