Closed
Bug 1898424
Opened 1 month ago
Closed 1 month ago
CookieRejectedPartitionedRequiresSecure error is confusing
Categories
(Core :: Privacy: Anti-Tracking, defect, P3)
Core
Privacy: Anti-Tracking
Tracking
()
RESOLVED
FIXED
128 Branch
Tracking | Status | |
---|---|---|
firefox128 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: timhuang)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
- With
network.cookie.cookieBehavior.optInPartitioning
set to true, andnetwork.cookie.CHIPS.enabled
set to false - On any tab, open DevTools Console
- Evaluate
document.cookie="foo=bar; Partitioned;"
The following error is printed in the console output: Cookie “foo” has been rejected because it has the “Partitioned” attribute but is missing the “secure” attribute.
But , if I evaluate document.cookie
, I do see foo=bar
in what's returned, and I can see the cookie in the storage panel, which seems at odd with the message that told me the cookie was "rejected" (i.e., in my mind, not created)
Here's where the message is emitted:
// Ensure the partitioned cookie is set with the secure attribute.
if (aCookieData.isPartitioned() && !aCookieData.isSecure()) {
CookieLogging::LogMessageToConsole(
aCRC, aHostURI, nsIScriptError::errorFlag, CONSOLE_REJECTION_CATEGORY,
"CookieRejectedPartitionedRequiresSecure"_ns,
AutoTArray<nsString, 1>{NS_ConvertUTF8toUTF16(aCookieData.name())});
// We only drop the cookie if CHIPS is enabled.
if (StaticPrefs::network_cookie_CHIPS_enabled()) {
return newCookie;
}
}
It looks like the "rejection" message should only be emitted when CHIPS is enabled?
Assignee | ||
Updated•1 month ago
|
Assignee | ||
Updated•1 month ago
|
Assignee: nobody → tihuang
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•1 month ago
|
||
Pushed by tihuang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c2ace87db772 Only emit CookieRejectedPartitionedRequiresSecure console message if CHIPS is enabled. r=bvandersloot
Comment 3•1 month ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
status-firefox128:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•