From a296574c70dfe983dd90f731e1d190ef8d6c7211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 4 Mar 2019 17:29:00 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20handling=20of=20invalid=20?= =?UTF-8?q?API=20keys?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/octoprint/server/util/__init__.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/octoprint/server/util/__init__.py b/src/octoprint/server/util/__init__.py index 0717bf816..356c8a892 100644 --- a/src/octoprint/server/util/__init__.py +++ b/src/octoprint/server/util/__init__.py @@ -66,12 +66,9 @@ def loginUserFromApiKey(): if not apikey: return False - if octoprint.server.appSessionManager.validate(apikey): - return False - user = get_user_for_apikey(apikey) if user is None: - return False + raise InvalidApiKeyException() if not loginUser(user): return False