From: Nicolas LÅ“uillet Date: Wed, 13 Nov 2013 14:17:34 +0000 (+0100) Subject: [fix] bug fix #287: test if open_basedir & safe_mode are active to use CURLOPT_FOLLOW... X-Git-Tag: 1.2.0~6 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=f2d3ee98a6a3137f8c3edd62294d34a8ff4700b6;p=github%2Fwallabag%2Fwallabag.git [fix] bug fix #287: test if open_basedir & safe_mode are active to use CURLOPT_FOLLOWLOCATION --- diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index 1d092823..7a872e7d 100644 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php @@ -133,7 +133,9 @@ class Tools $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_TIMEOUT, $timeout); - curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); + if (!ini_get('open_basedir') && !ini_get('safe_mode')) { + curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); + } curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_HEADER, false);