From 46fec8946061db2b58ef702d6052aeacb790a06f Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 6 Jun 2022 10:15:54 -0400 Subject: [PATCH] Fix routed deployment api key usage --- 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 9aece2d2..c3548cb0 100644 --- a/confluent_server/confluent/selfservice.py +++ b/confluent_server/confluent/selfservice.py @@ -120,6 +120,8 @@ def handle_request(env, start_response): start_response('401 Unauthorized', []) yield 'Unauthorized' return + if not isinstance(eak, str): + eak = eak.decode('utf8') salt = '$'.join(eak.split('$', 3)[:-1]) + '$' if crypt.crypt(apikey, salt) != eak: start_response('401 Unauthorized', [])