From 275ec1160b62c90dad3264e484e976213b0ada30 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Sat, 11 Apr 2026 00:15:13 +0100 Subject: [PATCH] importd: harden curl file protocol handling With old libcurl versions file:// can get redirects which can be messy, while the new version rejects them. Set an option to explicit block them. --- src/import/curl-util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/import/curl-util.c b/src/import/curl-util.c index 48842a20b7..52321d08e1 100644 --- a/src/import/curl-util.c +++ b/src/import/curl-util.c @@ -293,6 +293,8 @@ int curl_glue_make(CURL **ret, const char *url, void *userdata) { if (curl_easy_setopt(c, CURLOPT_PROTOCOLS_STR, "HTTP,HTTPS,FILE") != CURLE_OK) #else if (curl_easy_setopt(c, CURLOPT_PROTOCOLS, CURLPROTO_HTTP|CURLPROTO_HTTPS|CURLPROTO_FILE) != CURLE_OK) + return -EIO; + if (curl_easy_setopt(c, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP|CURLPROTO_HTTPS) != CURLE_OK) #endif return -EIO;