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:
parent
79d5a637a7
commit
b89ae4d74a
@ -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'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user