mirror of
https://github.com/usestrix/strix.git
synced 2026-10-06 02:48:10 +00:00
fix(login): reject malformed API token values in sign-in responses
This commit is contained in:
parent
d6ccb7c38a
commit
04a77e50e7
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue