commit 02a679cd24517d2935791df41f1b176c2693e5f6 parent c550d0a1594e05e5eaaa6f32fab2eea412f127c0 Author: Max Christian Pohle <mpohle@mozilla.com> Date: Thu, 6 Nov 2025 19:34:05 +0000 Bug 1995599 - [Backup Onboarding] An error is displayed for a split second when submitting a valid backup password r=sthompson Differential Revision: https://phabricator.services.mozilla.com/D271504 Diffstat:
| M | browser/components/backup/actors/BackupUIParent.sys.mjs | | | 7 | +++++++ |
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/browser/components/backup/actors/BackupUIParent.sys.mjs b/browser/components/backup/actors/BackupUIParent.sys.mjs @@ -113,7 +113,14 @@ export class BackupUIParent extends JSWindowActorParent { if (parentDirPath) { this.#bs.setParentDirPath(parentDirPath); } + if (password) { + // If the user's previously created backups were already encrypted + // with a password, their encryption settings are now reset to + // accommodate the newly supplied password. + if (await this.#bs.loadEncryptionState()) { + await this.#bs.disableEncryption(); + } await this.#bs.enableEncryption(password); Glean.browserBackup.passwordAdded.record(); }