From a54b3e81b6d6251473c8d549d35e97798e6f1f71 Mon Sep 17 00:00:00 2001 From: Dillon DuPont Date: Thu, 10 Jul 2025 15:42:51 -0400 Subject: [PATCH] Fixed REST based auth --- libs/python/computer-server/computer_server/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/python/computer-server/computer_server/main.py b/libs/python/computer-server/computer_server/main.py index f28fed73..5c396691 100644 --- a/libs/python/computer-server/computer_server/main.py +++ b/libs/python/computer-server/computer_server/main.py @@ -334,9 +334,9 @@ async def cmd_endpoint( logger.warning(f"API key validation failed. Status: {resp.status}") raise HTTPException(status_code=401, detail="Invalid API key") - auth_response = await resp.json() - if not auth_response.get("success"): - logger.warning(f"API key validation failed. Response: {auth_response}") + auth_failed = not (await resp.text()).strip() + if auth_failed: + logger.warning(f"API key validation failed.") raise HTTPException(status_code=401, detail="Invalid API key") logger.info("Authentication successful")