Skip to content

Commit

Permalink
Fixed bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction)
Browse files Browse the repository at this point in the history
  • Loading branch information
laruence committed May 5, 2012
1 parent 948ab62 commit 19632ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions NEWS
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion ext/curl/interface.c
Expand Up @@ -2177,7 +2177,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu

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;
}
Expand Down

0 comments on commit 19632ae

Please sign in to comment.