mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-15 23:31:29 +00:00
fix: extend request body parameter restrictions to cloud provider auth fields
This commit is contained in:
parent
09cd7e383e
commit
051d49f2fb
1 changed files with 9 additions and 1 deletions
|
|
@ -151,7 +151,15 @@ def is_request_body_safe(
|
|||
A malicious user can set the api_base to their own domain and invoke POST /chat/completions to intercept and steal the OpenAI API key.
|
||||
Relevant issue: https://huntr.com/bounties/4001e1a2-7b7a-4776-a3ae-e6692ec3d997
|
||||
"""
|
||||
banned_params = ["api_base", "base_url", "user_config"]
|
||||
banned_params = [
|
||||
"api_base",
|
||||
"base_url",
|
||||
"user_config",
|
||||
"aws_sts_endpoint",
|
||||
"aws_web_identity_token",
|
||||
"aws_role_name",
|
||||
"vertex_credentials",
|
||||
]
|
||||
|
||||
for param in banned_params:
|
||||
if (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue