diff --git a/confluent_server/confluent/selfservice.py b/confluent_server/confluent/selfservice.py index 2486a71e..d206337e 100644 --- a/confluent_server/confluent/selfservice.py +++ b/confluent_server/confluent/selfservice.py @@ -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'])