Closed Bug 2026913 Opened 7 months ago Closed 6 months ago

Remove nameless cookies (put them behind pref)

Categories

(Core :: Networking: Cookies, task, P2)

task

Tracking

()

RESOLVED FIXED
152 Branch
Tracking Status
firefox152 --- fixed

People

(Reporter: valentin, Assigned: valentin)

Details

(Whiteboard: [necko-triaged][necko-priority-next])

Attachments

(3 external files)

Nameless cookies have been a significant issue recently.
They are an odd edge case. Cookies like "abc" are parsed as {name: "", value: "abc" } by Firefox and Chrome. While Safari parses them as {name: "abc", value: "" }
The idea was that Firefox would mirror the nameless cookie back to the server in the same format (without an equal sign), and the server would handle it according to it's parser - as a nameless cookie, or as a valueless cookie.
However, if we have multiple nameless cookies, that entire plan breaks down. "abc; def" will result in two cookies being sent from Safari, but only one in Firefox and Chrome (as the second cookie overwrites the first one).

Also see bug 1964767 comment 3:

? From Squarcina's "Cookie Crumbles" https://www.usenix.org/system/files/usenixsecurity23-squarcina.pdf#page=10, from page 10, there's a table about analyzing nameless cookies in top 100K websites. From that analysis, nameless cookies are very rare and seem like a configuration mistake almost always (TOP 4: nameless cookies with the values HttpOnly, (empty string), Secure and =).

I think we should get rid of nameless cookies. I plan to put it behind a pref.

Attachment #9559273 - Attachment description: WIP: Bug 2026913 - Remove nameless cookies (put them behind pref) → Bug 2026913 - Remove nameless cookies (put them behind pref) r=baku,dveditz
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 152 Branch
QA Whiteboard: [qa-triage-done-c153/b152]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: