From ca441f419ca2e3a4a6cf90ac853a3ff6d69df967 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Fri, 21 Nov 2025 08:16:24 +0100 Subject: [fix] engines - set hard timouts in *sub-request* (#5460) The requests changed here all run outside of the network context timeout, thereby preventing the engine's timeout from being applied (the engine's timeout can become longer than it was configured). Signed-off-by: Markus Heiser --- searx/engines/azure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'searx/engines/azure.py') diff --git a/searx/engines/azure.py b/searx/engines/azure.py index 35538b561..4c916bc3b 100644 --- a/searx/engines/azure.py +++ b/searx/engines/azure.py @@ -95,7 +95,7 @@ def authenticate(t_id: str, c_id: str, c_secret: str) -> str: "scope": "https://management.azure.com/.default", } - resp: SXNG_Response = http_post(url, body) + resp: SXNG_Response = http_post(url, body, timeout=5) if resp.status_code != 200: raise RuntimeError(f"Azure authentication failed (status {resp.status_code}): {resp.text}") return resp.json()["access_token"] -- cgit v1.2.3