Commit:    19632ae7dcdbbb7c34bf0ffde9fb7858f55424cd
Author:    Xinchen Hui <larue...@php.net>         Sun, 6 May 2012 00:50:37 +0800
Parents:   948ab62c253de1460ca91874cb209961cad7bdd9
Branches:  PHP-5.4

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=19632ae7dcdbbb7c34bf0ffde9fb7858f55424cd

Log:
Fixed bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction)

Bugs:
https://bugs.php.net/61948

Changed paths:
  M  NEWS
  M  ext/curl/interface.c


Diff:
diff --git a/NEWS b/NEWS
index 9ef6abf..8b82237 100644
--- 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)
diff --git a/ext/curl/interface.c b/ext/curl/interface.c
index b359952..b03f346 100644
--- a/ext/curl/interface.c
+++ b/ext/curl/interface.c
@@ -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;
                        }


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to