]> git.wh0rd.org Git - tt-rss.git/commitdiff
only try to set fucking cookie jar if open_basedir restriction is not in effect
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 23 Oct 2013 09:34:47 +0000 (13:34 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 23 Oct 2013 09:34:47 +0000 (13:34 +0400)
include/functions.php

index 7c98055a691c0629e764bfce511e4a02574a9c3a..38ccfe8ac9e80aac553348c2b94786d6a7bae422 100644 (file)
                        curl_setopt($ch, CURLOPT_USERAGENT, SELF_USER_AGENT);
                        curl_setopt($ch, CURLOPT_ENCODING, "");
                        curl_setopt($ch, CURLOPT_REFERER, $url);
-                       curl_setopt($ch, CURLOPT_COOKIEJAR, "/dev/null");
+
+                       if (!ini_get("safe_mode") && !ini_get("open_basedir")) {
+                               curl_setopt($ch, CURLOPT_COOKIEJAR, "/dev/null");
+                       }
 
                        if (defined('_CURL_HTTP_PROXY')) {
                                curl_setopt($ch, CURLOPT_PROXY, _CURL_HTTP_PROXY);