Open Bug 1640266 Opened 4 years ago Updated 3 months ago

Sanitizer.jsm's shouldSanitizeOnShutdown logic that backs "Delete cookies and site data when Firefox is closed" probably should not run when Firefox is restarting to apply an update as indicated by the "browser.sessionstore.resume_session_once" pref

Categories

(Toolkit :: Data Sanitization, defect, P2)

defect

Tracking

()

People

(Reporter: asuth, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: dataloss, priv-triaged)

Firefox has a concept of restarting for an update that should not discard session state. The SessionStore is aware of this and sets the "browser.sessionstore.resume_session_once" preference to true in that case based on the arguments passed to onQuitApplication.

Currently, Sanitizer.jsm's shouldSanitizeOnShutdown doesn't seem to be aware of this, which manifests in perceived session loss for sites like chat.mozilla.org which store credentials in LocalStorage. (Subtlety: Only LocalStorage NextGen, available on nightly and early beta, is capable of surviving restarts. Legacy LocalStorage never persists data to disk.)

:johannh, does this make sense, or are there reasons to intentionally diverge in behavior in some cases?

Flags: needinfo?(jhofmann)
Blocks: 1421251
Blocks: 1650618

Yeah I think that makes sense, would be great to have this.

Flags: needinfo?(jhofmann)
Priority: -- → P2

I worry that there are potential dataloss issues here, where users might not expect us to throw away things like cookies and session data on update (rather than upon user initiated shutdown).

Keywords: dataloss
Flags: needinfo?(bugmail)
Flags: needinfo?(bugmail)
Duplicate of this bug: 1362962
See Also: → clear-data-revamp

This doesn't look like an enhancement to me, since there's potential for data loss, I'm switching this to a bug that should be worked on sooner rather than later. It is unexpected to have data cleared when running an update.

Severity: -- → S3
Type: enhancement → defect
You need to log in before you can comment on or make changes to this bug.