Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

Cookies separator ',' #390

Closed
Closed
@jods4

Description

@jods4

Because of this line of code:

while ((current < input.Length) && ((input[current] == ',') || (input[current] == ';')))

ASP.NET 5 accepts both ; and , as cookie value separators.
I know RFC 2965 said a server MUST accept ; and SHOULD accept , but newer RFC 6265 only speaks about ;. Specifically section 5.4 The Cookie Header, paragraph 4.2:

If there is an unprocessed cookie in the cookie-list, output the characters %x3B and %x20 ("; ").

I am opening this ticket because I have a real-world issue. My application is hosted on a sub-domain and because of that I receive third party cookies -- I know it's not the best situation but there's nothing I can do about it.

Some of those cookies contain JSON-like content:

{ "ccbm": 63, "ccus": 1440404858617, "ccfp": "oui"}

Which breaks the ASP.NET 5 cookie parser, which in turn breaks ASP.NET Identity middleware and my requests are refused because 401 Unauthorized.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions