Skip to content

Conversation

@nicolas-grekas
Copy link
Member

Q A
Branch? 6.1
Bug fix? no
New feature? yes
Deprecations? no
Tickets -
License MIT
Doc PR -

rfc-editor.org/rfc/rfc6265#section-1

[...], cookies for a given host are shared
across all the ports on that host, even though the usual "same-origin
policy" used by web browsers isolates content retrieved via different
ports.

rfc-editor.org/rfc/rfc6265#section-8.5

8.5. Weak Confidentiality
Cookies do not provide isolation by port. If a cookie is readable by a service running on one port, the cookie is also readable by a service running on another port of the same server.

In this PR, we propose to make HttpClient stricter as of version 6.1, by enforcing that the port also matches when automatically following redirections.

Patch courtesy of @GromNaN

@carsonbot
Copy link

Hey!

I think @matthieumota has recently worked with this code. Maybe they can help review this?

Cheers!

Carsonbot

@fabpot
Copy link
Member

fabpot commented Mar 4, 2022

Thank you @nicolas-grekas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants