Merge pull request #1550 from guardicore/config_import_fix

Config import fix
This commit is contained in:
Mike Salvatore 2021-10-26 09:57:48 -04:00 committed by GitHub
commit b8ed464909
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -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.")

View File

@ -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']);