mirror of
https://github.com/netinvent/npbackup.git
synced 2025-09-10 23:15:37 +08:00
Don't encrypt null values
This commit is contained in:
parent
4ab2d0f5dd
commit
668b99e1eb
1 changed files with 31 additions and 29 deletions
|
@ -261,6 +261,7 @@ def crypt_config(
|
|||
|
||||
def _crypt_config(key: str, value: Any) -> Any:
|
||||
if key_should_be_encrypted(key, encrypted_options):
|
||||
if value is not None:
|
||||
if operation == "encrypt":
|
||||
if (
|
||||
isinstance(value, str)
|
||||
|
@ -307,6 +308,7 @@ def is_encrypted(full_config: dict) -> bool:
|
|||
nonlocal is_encrypted
|
||||
|
||||
if key_should_be_encrypted(key, ENCRYPTED_OPTIONS):
|
||||
if value is not None:
|
||||
if isinstance(value, str) and (
|
||||
not value.startswith(ID_STRING) or not value.endswith(ID_STRING)
|
||||
):
|
||||
|
|
Loading…
Add table
Reference in a new issue