import: acceptSelfSignedCerts is validated at provider
This commit is contained in:
10
src/apps.js
10
src/apps.js
@@ -2235,11 +2235,6 @@ async function importApp(app, data, auditSource) {
|
||||
error = backups.validateFormat(backupFormat);
|
||||
if (error) throw error;
|
||||
|
||||
await backups.setupStorage(backupConfig, `/mnt/appimport-${app.id}`);
|
||||
backupConfig.rootPath = backups.getRootPath(backupConfig, `/mnt/appimport-${app.id}`);
|
||||
error = await backups.testStorage(backupConfig);
|
||||
if (error) throw error;
|
||||
|
||||
if ('password' in backupConfig) {
|
||||
backupConfig.encryption = backups.generateEncryptionKeysSync(backupConfig.password);
|
||||
delete backupConfig.password;
|
||||
@@ -2247,6 +2242,11 @@ async function importApp(app, data, auditSource) {
|
||||
backupConfig.encryption = null;
|
||||
}
|
||||
|
||||
await backups.setupStorage(backupConfig, `/mnt/appimport-${app.id}`); // this validates mountOptions
|
||||
backupConfig.rootPath = backups.getRootPath(backupConfig, `/mnt/appimport-${app.id}`);
|
||||
error = await backups.testStorage(backupConfig); // this validates provider and it's api options. requires rootPath
|
||||
if (error) throw error;
|
||||
|
||||
restoreConfig = { remotePath, backupFormat, backupConfig };
|
||||
} else {
|
||||
restoreConfig = { remotePath: null };
|
||||
|
||||
Reference in New Issue
Block a user