mirror of
https://github.com/xcat2/confluent.git
synced 2025-08-26 13:10:38 +00:00
Fix bytes being stored in db on identity image use
This commit is contained in:
@@ -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'])
|
||||
|
Reference in New Issue
Block a user