Closed Bug 2072496 Opened 2 months ago Closed 2 months ago

Cookies deleted on browser close with cookie exceptions set

Categories

(Firefox :: General, defect)

Firefox 156
defect

Tracking

()

RESOLVED DUPLICATE of bug 2065902

People

(Reporter: portbackward, Unassigned)

Details

(Keywords: regression)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:156.0) Gecko/20100101 Firefox/156.0

Steps to reproduce:

Hi, with Firefox 156.0 on macOS 27.0 cookie exception handling is not working like before. When settings delete cookies on browser close with site exceptions being set, all cookies are deleted. After closing and starting the browser, cookie exceptions are still set but the cookies were deleted.

Actual results:

Cookies were deleted for sites with explicit exceptions being set.

Expected results:

Cookies should not be deleted with explicit exceptions being set.

The Bugbug bot thinks this bug should belong to the 'Core::Privacy: Anti-Tracking' component, but is not confident enough to move the bug to that component.

Component: Untriaged → General

Sanitizer.sys.mjs preserves data on shutdown only for principals holding a persist-data-on-shutdown ALLOW permission, so a cookie ALLOW exception no longer exempts a site, a deliberate split in bug 1767271 to stop those exceptions from also disabling Total Cookie Protection. The "Manage Exceptions…" button next to "Delete cookies and site data when Firefox is closed" still writes the cookie type (privacy.mjs) and its description still promises persistence, while the button for the new permission sits in the History section and renders only when privacy.history.custom is set (privacy.mjs), so an exception added after upgrading has no effect and only the entries copied by migration 176 in ProfileDataUpgrader.sys.mjs still work.

Fix: Give the delete-on-close checkbox in Cookies and Site Data its own exceptions entry point opening the dialog with permissionType: "persist-data-on-shutdown", remove the custom-history-mode gating on shutdownClearingExceptions, and reword permissions-exceptions-cookie-desc in permissions.ftl so cookie Allow no longer implies data survives shutdown. Code owner looks like Toolkit :: Data Sanitization rather than Firefox :: General, with the dialog wiring in Firefox :: Settings UI.

Suggested severity: S2. Sites the user explicitly exempted silently lose their cookies and logins on every restart, and restoring the exception requires a button reachable only after switching history handling to custom.


If you'd like to provide feedback on this comment, please use the 👍 or 👎 reaction.
If you want to categorize your feedback you can add one of the following tags: ai-triage-wrong-file, ai-triage-wrong-cause, ai-triage-hallucination, ai-triage-out-of-scope, ai-triage-wrong-fix, ai-triage-shallow-fix.

Needinfo hackbot@mozilla.tld to have a patch generated for this bug, include any questions or directions as needed in your comment.

Keywords: regression
Regressed by: 1767271

:emz, since you are the author of the regressor, bug 1767271, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(emz)
Status: UNCONFIRMED → RESOLVED
Closed: 2 months ago
Duplicate of bug: 2065902
Flags: needinfo?(emz)
Resolution: --- → DUPLICATE

(In reply to Hackbot from comment #2)
Not an S2. It's a UX issue that has a workaround. => S3. The analysis is largely correct, but I did not find the supposed copy where "cookie" permissions are described as preserving data on shutdown.

No longer regressed by: 1767271

Here is how clear on shutdown exceptions can be added going forward. They are separate from cookie exceptions. https://bugzilla.mozilla.org/show_bug.cgi?id=2065902#c12

You need to log in before you can comment on or make changes to this bug.