2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-30 21:07:48 +00:00

Fix bytes being stored in db on identity image use

This commit is contained in:
Jarrod Johnson 2025-01-27 12:58:42 -05:00
parent 79d5a637a7
commit b89ae4d74a

View File

@ -135,6 +135,8 @@ def handle_request(env, start_response):
return
righthmac = hmac.new(hmackey, cryptkey, hashlib.sha256).digest()
if righthmac == crypthmac:
if not isinstance(cryptkey, str):
cryptkey = cryptkey.decode()
cfgupdate = {nodename: {'crypted.selfapikey': {'hashvalue': cryptkey}}}
cfg.set_node_attributes(cfgupdate)
cfg.clear_node_attributes([nodename], ['secret.selfapiarmtoken'])