forked from p34709852/monkey
Merge pull request #1550 from guardicore/config_import_fix
Config import fix
This commit is contained in:
commit
b8ed464909
|
@ -47,7 +47,7 @@ class PasswordBasedBytesEncryptor(IEncryptor):
|
|||
)
|
||||
except ValueError as ex:
|
||||
if str(ex).startswith("Wrong password"):
|
||||
logger.error("Wrong password provided for decryption.")
|
||||
logger.debug("Wrong password provided for decryption.")
|
||||
raise InvalidCredentialsError
|
||||
else:
|
||||
logger.error("The provided ciphertext was corrupt.")
|
||||
|
|
|
@ -37,7 +37,7 @@ const ConfigImportModal = (props: Props) => {
|
|||
if (configContents !== null) {
|
||||
sendConfigToServer();
|
||||
}
|
||||
}, [configContents])
|
||||
}, [configContents, unsafeOptionsVerified])
|
||||
|
||||
|
||||
function sendConfigToServer() {
|
||||
|
@ -67,6 +67,7 @@ const ConfigImportModal = (props: Props) => {
|
|||
} else if (res['import_status'] === 'unsafe_options_verification_required') {
|
||||
setUploadStatus(UploadStatuses.success);
|
||||
setErrorMessage('');
|
||||
|
||||
if (isUnsafeOptionSelected(res['config_schema'], JSON.parse(res['config']))) {
|
||||
setShowUnsafeOptionsConfirmation(true);
|
||||
setCandidateConfig(res['config']);
|
||||
|
|
Loading…
Reference in New Issue