fix SSRF via user-controlled OAuth URL

This commit is contained in:
KnyazSh 2026-04-17 09:19:27 +03:00
parent c4e5dbc38b
commit 4c27c6772e

View file

@ -2566,6 +2566,11 @@ async def handle_gigachat_passthrough_router_model(
data["json"] = request_body
data["custom_llm_provider"] = "gigachat"
# Remove sensitive keys from data
keys = ["gigachat_auth_url", "gigachat_access_token", "gigachat_scope"]
for key in keys:
data.pop(key, None)
client = get_async_httpx_client( # type: ignore
llm_provider=LlmProviders.GIGACHAT,
params={