create encryption keys from password during app import & restore

This commit is contained in:
Girish Ramakrishnan
2020-05-12 15:49:43 -07:00
parent 1df94fd84d
commit ea8a3d798e
3 changed files with 24 additions and 11 deletions

View File

@@ -1540,6 +1540,11 @@ 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;
}
const restoreConfig = { backupId, backupFormat, backupConfig };
const task = {