From 2629741b039580dd16475910e0ff12b91f0e5169 Mon Sep 17 00:00:00 2001 From: Levi Morrison Date: Thu, 26 Mar 2026 14:37:44 -0600 Subject: [PATCH] fix(common): don't use reqwest http proxies --- libdd-common/src/lib.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libdd-common/src/lib.rs b/libdd-common/src/lib.rs index f1346c9a5e..78860eb9d0 100644 --- a/libdd-common/src/lib.rs +++ b/libdd-common/src/lib.rs @@ -348,9 +348,14 @@ impl Endpoint { pub fn to_reqwest_client_builder(&self) -> anyhow::Result<(reqwest::ClientBuilder, String)> { use anyhow::Context; + // Don't use proxies, as this calls `getenv` which is unsafe and not + // just in theory. It can cause crashes with PHP where php-fpm's env + // configuration will mutate the system environment (it doesn't pass + // it as part of the SAPI env, it changes the actual system env). let mut builder = reqwest::Client::builder() .timeout(std::time::Duration::from_millis(self.timeout_ms)) - .hickory_dns(!self.use_system_resolver); + .hickory_dns(!self.use_system_resolver) + .no_proxy(); let request_url = match self.url.scheme_str() { // HTTP/HTTPS endpoints