Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

Fixed REST based auth

Dillon DuPonta54b3e81b6d6
diff --git a/libs/python/computer-server/computer_server/main.py b/libs/python/computer-server/computer_server/main.py
index f28fed7317..5c396691e1 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")