From 1eb19409b5435546774425c00523b9f88d4fccf9 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 8 Oct 2017 17:26:43 +0200 Subject: CURLOPT_FOLLOWLOCATION open_basedir bug (#1657) CURLOPT_FOLLOWLOCATION cannot be activated when an open_basedir is set https://github.com/FreshRSS/FreshRSS/issues/1655#issuecomment-334999448 https://stackoverflow.com/questions/6918623/curlopt-followlocation-cannot-be-activated --- lib/favicons.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/favicons.php b/lib/favicons.php index 80246ee74..2d6f7aab7 100644 --- a/lib/favicons.php +++ b/lib/favicons.php @@ -31,12 +31,12 @@ function downloadHttp(&$url, $curlOptions = array()) { } $ch = curl_init($url); curl_setopt_array($ch, array( - CURLOPT_FOLLOWLOCATION => true, - CURLOPT_MAXREDIRS => 10, CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 15, CURLOPT_USERAGENT => FRESHRSS_USERAGENT, + CURLOPT_MAXREDIRS => 10, )); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); //Keep option separated for open_basedir bug if (defined('CURLOPT_ENCODING')) { curl_setopt($ch, CURLOPT_ENCODING, ''); //Enable all encodings } -- cgit v1.2.3