Skip to content

RFC6265bis: Prevent nameless cookies with prefixed values - #2251

Merged
mikewest merged 3 commits into
httpwg:mainfrom
sbingler:NamelessPrefix
Oct 18, 2022
Merged

RFC6265bis: Prevent nameless cookies with prefixed values#2251
mikewest merged 3 commits into
httpwg:mainfrom
sbingler:NamelessPrefix

Conversation

@sbingler

Copy link
Copy Markdown
Collaborator

Modify the cookie storage algorithm to reject cookies that:

  • Do not have a name
  • Have values that look like cookie prefixes

As mentioned in #2229, malicious servers can exploit nameless cookies to impersonate prefix'd cookies.

@mikewest mikewest left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that we accept nameless cookies, this looks like a reasonable approach to me. We would ideally figure out how to stop accepting nameless cookies, but that's a larger effort. :)

Do we have tests for this behavior in WPT?

@sbingler

Copy link
Copy Markdown
Collaborator Author

Do we have tests for this behavior in WPT?

Good question, no not yet. I'll add some.

@sbingler

sbingler commented Oct 5, 2022

Copy link
Copy Markdown
Collaborator Author

Done

@sbingler

Copy link
Copy Markdown
Collaborator Author

Ping @mikewest

@mikewest
mikewest merged commit fb17121 into httpwg:main Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants