Disable backup for users who have sanitizeOnShutdown turned on
Categories
(Firefox :: Profile Backup, task, P1)
Tracking
()
People
(Reporter: hsohaney, Assigned: hsohaney)
References
(Blocks 1 open bug)
Details
(Keywords: triaged, Whiteboard: [fidedi-fx-backup-blocking])
Attachments
(2 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
| Assignee | ||
Updated•2 months ago
|
Updated•2 months ago
|
| Assignee | ||
Comment 1•2 months ago
|
||
Comment 4•2 months ago
|
||
Reverted this because it was causing mochitests failures in browser/browser_settings.js.
- Revert link
- Push with failures
- Failure Log
- Failure line: TEST-UNEXPECTED-FAIL | browser/components/backup/tests/browser/browser_settings.js | Backup section is now hidden - false == true -
Comment 7•2 months ago
|
||
| bugherder | ||
Comment 8•2 months ago
|
||
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, andbrowser.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
| Assignee | ||
Comment 9•2 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D269500
Updated•2 months ago
|
Updated•2 months ago
|
Comment 10•2 months ago
|
||
| uplift | ||
Updated•2 months ago
|
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:
- Enable backup feature, add a bookmark and then create a backup
- Switch the pref
privacy.sanitize.sanitizeOnShutdownto the valuetrue - Open the Browser console (just to see the error it throws)
- Open Application menu (hamburger menu) > Bookmarks and delete a bookmark.
- 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.
| Assignee | ||
Comment 12•2 months ago
|
||
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!
Comment 13•2 months ago
•
|
||
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)
Comment 14•2 months ago
|
||
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.
Comment 15•2 months ago
|
||
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.
Description
•