From 0f6b926393a514e2b3f76f05ae2a0712c1df8036 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 23 Oct 2013 13:34:47 +0400 Subject: [PATCH] only try to set fucking cookie jar if open_basedir restriction is not in effect --- include/functions.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/functions.php b/include/functions.php index 7c98055a..38ccfe8a 100644 --- a/include/functions.php +++ b/include/functions.php @@ -378,7 +378,10 @@ 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); -- 2.39.2