From a9ce3e539028b2484991d21528a09cc3f41210de Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Wed, 17 Feb 2021 14:54:45 +0100 Subject: Testing auto-filter in the JSON encoder based on ! points markering sensitive data. --- archinstall/lib/general.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'archinstall') diff --git a/archinstall/lib/general.py b/archinstall/lib/general.py index dc94b063..97ad1565 100644 --- a/archinstall/lib/general.py +++ b/archinstall/lib/general.py @@ -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() -- cgit v1.2.3-70-g09d2