fix: tighten api_key value check in credential validation

This commit is contained in:
Yuneng Jiang
2026-04-16 16:01:07 -07:00
parent 5df7c21c9a
commit 2ea3fafb68
+2 -1
View File
@@ -69,7 +69,8 @@ def check_complete_credentials(request_body: dict) -> bool:
# complex credentials - easier to make a malicious request
return False
if "api_key" in request_body:
api_key_value = request_body.get("api_key")
if api_key_value and isinstance(api_key_value, str) and api_key_value.strip():
return True
return False