From cc1b887c31c55249118dad916394cd8953868ad8 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 17 Nov 2021 09:00:58 -0500 Subject: [PATCH] Allow blanking to disable a crypted password --- confluent_server/confluent/config/configmanager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/confluent_server/confluent/config/configmanager.py b/confluent_server/confluent/config/configmanager.py index 08f4f44f..1b1888b0 100644 --- a/confluent_server/confluent/config/configmanager.py +++ b/confluent_server/confluent/config/configmanager.py @@ -1764,7 +1764,7 @@ class ConfigManager(object): if attrib.startswith('crypted.'): if not isinstance(curr[attrib], dict): curr[attrib] = {'value': curr[attrib]} - if 'hashvalue' not in curr[attrib]: + if 'hashvalue' not in curr[attrib] and curr[attrib]['value']: curr[attrib]['hashvalue'] = hashcrypt_value( curr[attrib]['value']) if 'grubhashvalue' not in curr[attrib]: @@ -2186,7 +2186,7 @@ class ConfigManager(object): if attrib.startswith('crypted.'): if not isinstance(curr[attrib], dict): curr[attrib] = {'value': curr[attrib]} - if 'hashvalue' not in curr[attrib]: + if 'hashvalue' not in curr[attrib] and curr[attrib]['value']: curr[attrib]['hashvalue'] = hashcrypt_value( curr[attrib]['value']) if 'grubhashvalue' not in curr[attrib]: