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

Fix cases where cookie may have duplicate parameters #199

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

vrurg
Copy link
Contributor

@vrurg vrurg commented Oct 23, 2024

This is a real-life case where dumb ASP.NET software managed to set two conflicting values for SameSite parameter. Such situation causes Cro::HTTP::Cookie to die.

According to RFC 6265bis specs (or, at least, according to how ChatGPT interprets them since I got no time to read them in full), the standard parameters must not be repeated. If this is not the case then client software should either reject wrong-made cookie or use the first specified parameter. From the resilience perspective, the second approach is preferable.

This is a real-life case where dumb ASP.NET software managed to set two
conflicting values for `SameSite` parameter. Such situation causes
Cro::HTTP::Cookie to die.

According to RFC 6265bis specs (or, at least, according to how ChatGPT
interprets them since I got no time to read them in full), the standard
parameters must not be repeated. If this is not the case then client
software should either reject wrong-made cookie or use the first
specified parameter. From the resilience perspective, the second
approach is preferable.
@patrickbkr
Copy link
Member

This is looking good. Thanks!

@patrickbkr patrickbkr merged commit 809847d into croservices:master Oct 23, 2024
2 checks passed
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.

2 participants