Testing auto-filter in the JSON encoder based on ! points markering sensitive data.

This commit is contained in:
Anton Hvornum 2021-02-17 14:54:45 +01:00
parent 930fc994d9
commit a9ce3e5390
2 changed files with 7 additions and 4 deletions

View File

@ -45,7 +45,10 @@ class JSON_Encoder:
else:
val = JSON_Encoder._encode(val)
del(obj[key])
obj[JSON_Encoder._encode(key)] = val
if type(key) == str and key[0] == '!':
obj[JSON_Encoder._encode(key)] = '******'
else:
obj[JSON_Encoder._encode(key)] = val
return obj
elif hasattr(obj, 'json'):
return obj.json()

View File

@ -150,9 +150,9 @@ if archinstall.arguments['harddrive'].has_partitions():
archinstall.arguments['harddrive'].keep_partitions = False
# Get disk encryption password (or skip if blank)
if not archinstall.arguments.get('encryption-password', None):
archinstall.arguments['encryption-password'] = archinstall.get_password(prompt='Enter disk encryption password (leave blank for no encryption): ')
archinstall.arguments['harddrive'].encryption_password = archinstall.arguments['encryption-password']
if not archinstall.arguments.get('!encryption-password', None):
archinstall.arguments['!encryption-password'] = archinstall.get_password(prompt='Enter disk encryption password (leave blank for no encryption): ')
archinstall.arguments['harddrive'].encryption_password = archinstall.arguments['!encryption-password']
# Get the hostname for the machine
if not archinstall.arguments.get('hostname', None):