mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
fix: tighten api_key value check in credential validation
This commit is contained in:
parent
5df7c21c9a
commit
2ea3fafb68
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue