Closed Bug 1995651 Opened 2 months ago Closed 2 months ago

Disable backup for users who have sanitizeOnShutdown turned on

Categories

(Firefox :: Profile Backup, task, P1)

task

Tracking

()

VERIFIED FIXED
146 Branch
Tracking Status
firefox145 --- verified
firefox146 --- verified
firefox147 --- verified

People

(Reporter: hsohaney, Assigned: hsohaney)

References

(Blocks 1 open bug)

Details

(Keywords: triaged, Whiteboard: [fidedi-fx-backup-blocking])

Attachments

(2 files)

No description provided.
Whiteboard: [fidedi-fx-backup-blocking]
Pushed by sstanca@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/2674356a3e76 https://hg.mozilla.org/integration/autoland/rev/1fe85d2c426a Revert "Bug 1995651 - Disable backup for users who have sanitizeOnShutdown turned on. r=fchasen" for causing mochitests failures in rowser/browser_settings.js.

Reverted this because it was causing mochitests failures in browser/browser_settings.js.

Flags: needinfo?(hsohaney)

Thanks! Working on a fix right now

Flags: needinfo?(hsohaney)
Severity: N/A → S3
Keywords: triaged
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 146 Branch

firefox-beta Uplift Approval Request

  • User impact if declined: This is a part of the MVP requirements for fxBackup. User's might see unexpected data being backed up if they want their data deleted on shutdown.
  • Code covered by automated testing: yes
  • Fix verified in Nightly: yes
  • Needs manual QE test: yes
  • Steps to reproduce for manual QE testing: 1. Make sure you have browser.backup.enabled=true , browser.backup.archive.enabled=true, and browser.backup.restore.enabled=true. These prefs enable all the parts of the backup service and the settings ui.

To test this, set privacy.sanitize.sanitizeOnShutdown=true or enable sanitize on shutdown from about:preferences#privacy.

Expected:
The backup section under about:preferences#sync should disappear and no more backups should be made.

  • Risk associated with taking this patch: low
  • Explanation of risk level: Adds a check to the backup status getters.
  • String changes made/needed: No
  • Is Android affected?: no
Attachment #9522689 - Flags: approval-mozilla-beta?
Flags: qe-verify+
Attachment #9522689 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triage-done-c146/b145]
QA Contact: bmaris

During testing on Nightly 146.0a1 I noticed that if a user switches the pref privacy.sanitize.sanitizeOnShutdown=true after a backup was made before any backup and deletes a bookmark will also remove the entire backup .html file created previously.

STR:

  1. Enable backup feature, add a bookmark and then create a backup
  2. Switch the pref privacy.sanitize.sanitizeOnShutdown to the value true
  3. Open the Browser console (just to see the error it throws)
  4. Open Application menu (hamburger menu) > Bookmarks and delete a bookmark.
  5. Manually go to the location where the backup was previously saved

Actual result:

  • The backup created earlier is deleted once the bookmark is deleted.

Error from Browser Console:

Uncaught (in promise) TypeError: can't access property "setSelectionRange", input is null
    updated chrome://browser/content/backup/backup-settings.mjs:499
    _$didUpdate chrome://global/content/vendor/lit.all.mjs:875
    performUpdate chrome://global/content/vendor/lit.all.mjs:841
    scheduleUpdate chrome://global/content/vendor/lit.all.mjs:781
    __enqueueUpdate chrome://global/content/vendor/lit.all.mjs:754

 backup-settings.mjs:499:7

Not sure if this is intended but I would think that it is not. Ni? for clarifications.

Flags: needinfo?(hsohaney)

This happens because once the user changes certain items (like bookmarks or passwords), we trigger a new backup to be created. However, before creating a new backup, the old backup is deleted. Since having sanitizeOnShutdown=false, the createBackup call wont work, but the delete will.

I'll let David clarify if this behavior is alright or if we should patch this up. Thanks for catching this!

Flags: needinfo?(hsohaney) → needinfo?(drubino)

Yeah, I thought that was the case why it deleted it.
Just as an another note, this exact thing also happens if we hide the backup/restore when we detect browser.profiles.created=true and trigger a backup (bug 1990634)

I think there's a bigger issue here I hadn't considered... basically any time backup was on and there is a backup file being maintained, and then backup is turned off... whether by the user or by one of these other changes, we should delete the backup file immediately. It should already be gone by the time a bookmark is deleted the next time (for example)

Will move the question to Slack and it might result in a new bug too.

Flags: needinfo?(drubino)

Just a follow up, for comment#14 bug 1998176 was logged and fixed.
This issue is verified as fixed on Win11x64 using FF build 146.0b1 and 147.0a1 and 145.0.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triage-done-c146/b145] → [qa-triage-done-c146/b145][qa-ver-done-c146/b145]
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: