Store distinct "default" samesite attribute value even if the laxByDefault pref is false
Categories
(Core :: Networking: Cookies, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox101 | --- | fixed |
People
(Reporter: dveditz, Assigned: tschuster)
References
Details
Attachments
(1 file, 1 obsolete file)
We currently only support three values for samesite: lax, strict, and none. Since the time that code was implemented in bug 1551798 the early spec was merged into rfc6265bis and clarified. The spec now requires storing an explicit "default" value
https://www.ietf.org/archive/id/draft-ietf-httpbis-rfc6265bis-09.html#section-5.5-3.16
We can track that state, but currently we only do so if the laxByDefault
pref is true
. The result is that by time we turn laxByDefault on, users with old profiles have a bunch of old cookies whose samesite value is interpreted as an explicit "None". As long as those cookies are not updated this will hide sites that are broken by the "laxByDefault" setting, possibly delaying detection until after we ship and fresh users start using the broken site.
Our storage of this attribute is goofy (a "raw" and "interpreted" attribute), but we can use it to indicate "default" samesite attributes -- essentially we do that when the laxByDefault pref is set to true.
This bug proposes to change the storing of cookies to ignore the laxByDefault pref and always store the 4 values (lax, strict, none, and default) described in the spec. The use of cookies does not need to be changed because it already does the right thing based on the state of the laxByDefault pref.
I am not proposing to rewrite the storage to use a single column with 4 values at this time. That can be a later clean up, but at the moment getting rid of one of the columns would cause an older Firefox to decide the cookie database is corrupt and delete them all. Plus that would be a bigger change requiring a lot more testing and fingernail biting about regressions.
Comment 1•4 years ago
|
||
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Comment 2•3 years ago
|
||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Comment 4•3 years ago
|
||
Backed out for causing multiple cookies failures.
- backout: https://hg.mozilla.org/integration/autoland/rev/615bf7a32f729d58f65cdbdfd8d0ccc81dde1199
- push: https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&revision=0acc23548adff4283f954d9e433d41f8a1bc6ece
- push with more failures: https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&revision=e881ef466324323602dbb3dac1882dc732ec7388&searchStr=mochitest-plain
- failure logs:
Comment 7•3 years ago
|
||
bugherder |
Description
•