aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-11-13 15:17:34 +0100
committerNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-11-13 15:17:34 +0100
commitf2d3ee98a6a3137f8c3edd62294d34a8ff4700b6 (patch)
tree28a9430d4fc0b8233a84b4362edf022327ecea19 /inc/poche
parent5862c872c6c63c8a0a8d33e751e3ee5146b2728e (diff)
downloadwallabag-f2d3ee98a6a3137f8c3edd62294d34a8ff4700b6.tar.gz
wallabag-f2d3ee98a6a3137f8c3edd62294d34a8ff4700b6.tar.zst
wallabag-f2d3ee98a6a3137f8c3edd62294d34a8ff4700b6.zip
[fix] bug fix #287: test if open_basedir & safe_mode are active to use CURLOPT_FOLLOWLOCATION
Diffstat (limited to 'inc/poche')
-rw-r--r--inc/poche/Tools.class.php4
1 files changed, 3 insertions, 1 deletions
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
133 $curl = curl_init(); 133 $curl = curl_init();
134 curl_setopt($curl, CURLOPT_URL, $url); 134 curl_setopt($curl, CURLOPT_URL, $url);
135 curl_setopt($curl, CURLOPT_TIMEOUT, $timeout); 135 curl_setopt($curl, CURLOPT_TIMEOUT, $timeout);
136 curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); 136 if (!ini_get('open_basedir') && !ini_get('safe_mode')) {
137 curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
138 }
137 curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); 139 curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
138 curl_setopt($curl, CURLOPT_HEADER, false); 140 curl_setopt($curl, CURLOPT_HEADER, false);
139 141