From b89ae4d74a13de5c2c914dd886f81bdf3757dc02 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 27 Jan 2025 12:58:42 -0500 Subject: [PATCH] Fix bytes being stored in db on identity image use --- confluent_server/confluent/selfservice.py | 2 ++ 1 file changed, 2 insertions(+) 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'])