]> git.ipfire.org Git - pakfire.git/commitdiff
downloader: Only follow up to 30 redirects
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 20 Oct 2023 13:43:48 +0000 (13:43 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 20 Oct 2023 13:43:48 +0000 (13:43 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/downloader.c

index cc9381cfe845b626b5f2a73bcb406c9bac0b9ad5..edbeb2c788dbf4ce00caa8eed2578f0833d044c3 100644 (file)
@@ -412,6 +412,9 @@ static int pakfire_downloader_transfer_setup(
        // Follow any redirects
        curl_easy_setopt(transfer->handle, CURLOPT_FOLLOWLOCATION, 1);
 
+       // Only follow up to 30 redirects
+       curl_easy_setopt(transfer->handle, CURLOPT_MAXREDIRS, 30L);
+
        // Read any data from a callback function
        curl_easy_setopt(transfer->handle,
                CURLOPT_READFUNCTION, pakfire_downloader_transfer_read);