From 936d766cae0aebb4c11170c2be87a97b95aff710 Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Fri, 4 Jun 2021 14:48:21 -0400 Subject: [PATCH] authorization: correctly handle the transition from a deprecated signature algorithm SIgned-off-by: Eric Callahan --- moonraker/components/authorization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moonraker/components/authorization.py b/moonraker/components/authorization.py index babd145..821a785 100644 --- a/moonraker/components/authorization.py +++ b/moonraker/components/authorization.py @@ -96,7 +96,7 @@ class Authorization: try: priv_key = self._load_private_key(user_info['jwt_secret']) jwk_id = user_info['jwk_id'] - except self.server.error: + except (self.server.error, KeyError): logging.info("Invalid key found for user, removing") user_info.pop('jwt_secret', None) user_info.pop('jwk_id', None)