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

Host cookie-prefix requires Path attribute #222

Closed
ericlaw1979 opened this issue Aug 9, 2016 · 1 comment
Closed

Host cookie-prefix requires Path attribute #222

ericlaw1979 opened this issue Aug 9, 2016 · 1 comment
Assignees
Labels

Comments

@ericlaw1979
Copy link

https://github.com/httpwg/http-extensions/blob/master/draft-ietf-httpbis-cookie-prefixes.md contains the following text:

4. Sent to every request for a host. That is, a cookie named "__Host-cookie1" 
    MUST contain a Path attribute with a value of "/".

The following cookies would always be rejected:

Set-Cookie: __Host-SID=12345
Set-Cookie: __Host-SID=12345; Secure

The start of the sentence "That is," implies that the only way to ensure a cookie is sent to every path is to explicitly include Path=/ but this isn't the case; the cookie Set-Cookie: __Host-SID=12345; Secure will be sent to every path if the page containing this response header is served from the root of the server.

Looking at Chrome's code, it appears that we explicitly require the path attribute be present with a value of Path=/

So, proposed change (also optionally cleaning up parallelism for point 3):

3. Set without a Domain attribute. That is, a cookie set from https://example.com will therefore be sent only to example.com, and not to subdomain.example.com.

4. Set with an explicit Path attribute with a value of "/".

The following cookies would always be rejected:

Set-Cookie: __Host-SID=12345
Set-Cookie: __Host-SID=12345; Secure
@mnot mnot added the 6265bis label Aug 10, 2016
@mikewest mikewest self-assigned this Aug 16, 2016
@mnot mnot added the design label Mar 3, 2017
@mikewest
Copy link
Member

mikewest commented Aug 7, 2017

Poked at the algorithm in the upcoming -02 draft of RFC6265bis.

@mikewest mikewest added this to the -next milestone Aug 7, 2017
@mikewest mikewest modified the milestone: -next Aug 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants