Bug 1903606 - Prevent recovery from backups created from an application with a different appName. r=backup-reviewers,sthompson,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D215002
This commit is contained in:
@@ -2085,6 +2085,12 @@ export class BackupService extends EventTarget {
|
||||
|
||||
let meta = manifest.meta;
|
||||
|
||||
if (meta.appName != AppConstants.MOZ_APP_NAME) {
|
||||
throw new Error(
|
||||
`Cannot recover a backup from ${meta.appName} in ${AppConstants.MOZ_APP_NAME}`
|
||||
);
|
||||
}
|
||||
|
||||
// Okay, we have a valid backup-manifest.json. Let's create a new profile
|
||||
// and start invoking the recover() method on each BackupResource.
|
||||
let profileSvc = Cc["@mozilla.org/toolkit/profile-service;1"].getService(
|
||||
|
||||
Reference in New Issue
Block a user