]> granicus.if.org Git - php/commitdiff
Fixed bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction)
authorXinchen Hui <laruence@php.net>
Sat, 5 May 2012 16:50:37 +0000 (00:50 +0800)
committerXinchen Hui <laruence@php.net>
Sat, 5 May 2012 16:50:37 +0000 (00:50 +0800)
NEWS
ext/curl/interface.c

diff --git a/NEWS b/NEWS
index 9ef6abf66f0e33598f93e3de27767fcd94ca4bdb..8b8223784911e6d25d6e1f363b9312f09bc6112c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,10 @@ PHP                                                                        NEWS
     bug #61785 (Memory leak when access a non-exists file without router).
     (Laruence)
 
+- CURL:
+  . Fixed bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction).
+    (Laruence)
+
 - Core:
   . Fixed bug #61922 (ZTS build doesn't accept zend.script_encoding config).
     (Laruence)
index b359952a8bd86daeafd084370c0206828137695f..b03f346b59b40252a8c5ad27a38c5d1f3d31d82c 100644 (file)
@@ -2177,7 +2177,7 @@ string_copy:
 
                        convert_to_string_ex(zvalue);
 
-                       if (php_check_open_basedir(Z_STRVAL_PP(zvalue) TSRMLS_CC)) {
+                       if (!Z_STRLEN_PP(zvalue) || php_check_open_basedir(Z_STRVAL_PP(zvalue) TSRMLS_CC)) {
                                RETVAL_FALSE;
                                return 1;
                        }