import: fix crash because encryption is unset
This commit is contained in:
10
src/apps.js
10
src/apps.js
@@ -1542,9 +1542,13 @@ function importApp(app, data, auditSource, callback) {
|
||||
testBackupConfig(function (error) {
|
||||
if (error) return callback(error);
|
||||
|
||||
if (backupConfig && 'password' in backupConfig) {
|
||||
backupConfig.encryption = backups.generateEncryptionKeysSync(backupConfig.password);
|
||||
delete backupConfig.password;
|
||||
if (backupConfig) {
|
||||
if ('password' in backupConfig) {
|
||||
backupConfig.encryption = backups.generateEncryptionKeysSync(backupConfig.password);
|
||||
delete backupConfig.password;
|
||||
} else {
|
||||
backupConfig.encryption = null;
|
||||
}
|
||||
}
|
||||
|
||||
const restoreConfig = { backupId, backupFormat, backupConfig };
|
||||
|
||||
Reference in New Issue
Block a user