Improved wording in configuration export related logs and UI

This commit is contained in:
VakarisZ 2021-06-07 11:41:28 +03:00
parent 1125b0fe4b
commit 04a35a1e36
3 changed files with 3 additions and 3 deletions

View File

@ -63,7 +63,7 @@ class ConfigurationImport(flask_restful.Resource):
return ResponseContents( return ResponseContents(
import_status=ImportStatuses.INVALID_CONFIGURATION, import_status=ImportStatuses.INVALID_CONFIGURATION,
message="Invalid configuration supplied. " message="Invalid configuration supplied. "
"Maybe the format is outdated or the file is corrupted.", "Maybe the format is outdated or the file has been corrupted.",
).form_response() ).form_response()
except NoCredentialsError: except NoCredentialsError:
return ResponseContents( return ResponseContents(

View File

@ -50,7 +50,7 @@ def decrypt_config(cyphertext: str, password: str) -> Dict:
logger.info("Wrong password for configuration provided.") logger.info("Wrong password for configuration provided.")
raise InvalidCredentialsError raise InvalidCredentialsError
else: else:
logger.info("Configuration is corrupted.") logger.info("The provided configuration file is corrupt.")
raise ex raise ex
plaintext_config = json.loads(dec_plaintext_config_stream.getvalue().decode("utf-8")) plaintext_config = json.loads(dec_plaintext_config_stream.getvalue().decode("utf-8"))
return plaintext_config return plaintext_config

View File

@ -119,7 +119,7 @@ const ExportPlaintextChoiceField = (props: {
/> />
<p className={`export-warning text-secondary`}> <p className={`export-warning text-secondary`}>
Configuration may contain stolen credentials or sensitive data.<br/> Configuration may contain stolen credentials or sensitive data.<br/>
It is advised to use the <b>Encrypt with a password</b> option. It is recommended that you use the <b>Encrypt with a password</b> option.
</p> </p>
</div> </div>
) )