From 04a77e50e7b64697b7ace356d62b2fb05257b315 Mon Sep 17 00:00:00 2001 From: Alex Schapiro Date: Wed, 26 Aug 2026 21:24:57 +0000 Subject: [PATCH] fix(login): reject malformed API token values in sign-in responses --- strix/interface/platform_cli.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/strix/interface/platform_cli.py b/strix/interface/platform_cli.py index 99c72411..1f05eb05 100644 --- a/strix/interface/platform_cli.py +++ b/strix/interface/platform_cli.py @@ -265,7 +265,8 @@ def _signed_in_record(response: requests.Response) -> dict[str, Any]: def _require_api_token(record: dict[str, Any]) -> dict[str, Any]: - if not str(record.get("api_token") or ""): + api_token = record.get("api_token") + if not isinstance(api_token, str) or not api_token.strip(): raise PlatformAuthError("the server returned a sign-in response without an API token") return record