create encryption keys from password during app import & restore
This commit is contained in:
@@ -206,9 +206,14 @@ function restore(backupConfig, backupId, version, sysinfoConfig, auditSource, ca
|
||||
if (error) return done(error);
|
||||
if (activated) return done(new BoxError(BoxError.CONFLICT, 'Already activated. Restore with a fresh Cloudron installation.'));
|
||||
|
||||
backups.testConfig(backupConfig, function (error) {
|
||||
backups.testProviderConfig(backupConfig, function (error) {
|
||||
if (error) return done(error);
|
||||
|
||||
if ('password' in backupConfig) {
|
||||
backupConfig.encryption = backups.generateEncryptionKeysSync(backupConfig.password);
|
||||
delete backupConfig.password;
|
||||
}
|
||||
|
||||
sysinfo.testConfig(sysinfoConfig, function (error) {
|
||||
if (error) return done(error);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user