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:
|
except ValueError as ex:
|
||||||
if str(ex).startswith("Wrong password"):
|
if str(ex).startswith("Wrong password"):
|
||||||
logger.error("Wrong password provided for decryption.")
|
logger.debug("Wrong password provided for decryption.")
|
||||||
raise InvalidCredentialsError
|
raise InvalidCredentialsError
|
||||||
else:
|
else:
|
||||||
logger.error("The provided ciphertext was corrupt.")
|
logger.error("The provided ciphertext was corrupt.")
|
||||||
|
|
|
@ -37,7 +37,7 @@ const ConfigImportModal = (props: Props) => {
|
||||||
if (configContents !== null) {
|
if (configContents !== null) {
|
||||||
sendConfigToServer();
|
sendConfigToServer();
|
||||||
}
|
}
|
||||||
}, [configContents])
|
}, [configContents, unsafeOptionsVerified])
|
||||||
|
|
||||||
|
|
||||||
function sendConfigToServer() {
|
function sendConfigToServer() {
|
||||||
|
@ -67,6 +67,7 @@ const ConfigImportModal = (props: Props) => {
|
||||||
} else if (res['import_status'] === 'unsafe_options_verification_required') {
|
} else if (res['import_status'] === 'unsafe_options_verification_required') {
|
||||||
setUploadStatus(UploadStatuses.success);
|
setUploadStatus(UploadStatuses.success);
|
||||||
setErrorMessage('');
|
setErrorMessage('');
|
||||||
|
|
||||||
if (isUnsafeOptionSelected(res['config_schema'], JSON.parse(res['config']))) {
|
if (isUnsafeOptionSelected(res['config_schema'], JSON.parse(res['config']))) {
|
||||||
setShowUnsafeOptionsConfirmation(true);
|
setShowUnsafeOptionsConfirmation(true);
|
||||||
setCandidateConfig(res['config']);
|
setCandidateConfig(res['config']);
|
||||||
|
|
Loading…
Reference in New Issue