Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/curl/interface.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/curl/interface.c trunk/ext/curl/interface.c
On 22.04.2010 12:58, Pierre Joye wrote: pajoye Thu, 22 Apr 2010 08:58:07 + Revision: http://svn.php.net/viewvc?view=revisionrevision=298299 Log: - Bug #51629, CURLOPT_FOLLOWLOCATION error message is misleading Bug: http://bugs.php.net/51629 (Open) CURLOPT_FOLLOWLOCATION error message is misleading Did you fix the test? -- Wbr, Antony Dovgal --- http://pinba.org - realtime statistics for PHP -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/curl/interface.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/curl/interface.c trunk/ext/curl/interface.c
iliaaTue, 02 Mar 2010 12:54:23 + Revision: http://svn.php.net/viewvc?view=revisionrevision=295731 Log: Fixed bug #51171 (curl_setopt() doesn't output any errors or warnings when an invalid option is provided) Bug: http://bugs.php.net/51171 (error getting bug information) Changed paths: U php/php-src/branches/PHP_5_2/NEWS U php/php-src/branches/PHP_5_2/ext/curl/interface.c U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/curl/interface.c U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/branches/PHP_5_2/NEWS === --- php/php-src/branches/PHP_5_2/NEWS 2010-03-02 12:33:45 UTC (rev 295730) +++ php/php-src/branches/PHP_5_2/NEWS 2010-03-02 12:54:23 UTC (rev 295731) @@ -1,6 +1,8 @@ PHPNEWS ||| ?? ??? 2010, PHP 5.2.14 +- Fixed bug #51171 (curl_setopt() doesn't output any errors or warnings when + an invalid option is provided). (Ilia) 25 Feb 2010, PHP 5.2.13 Modified: php/php-src/branches/PHP_5_2/ext/curl/interface.c === --- php/php-src/branches/PHP_5_2/ext/curl/interface.c 2010-03-02 12:33:45 UTC (rev 295730) +++ php/php-src/branches/PHP_5_2/ext/curl/interface.c 2010-03-02 12:54:23 UTC (rev 295731) @@ -1772,6 +1772,10 @@ ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); convert_to_long_ex(zoption); + if (Z_LVAL_PP(zoption) = 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid curl configuration option); + RETURN_FALSE; + } if (!_php_curl_setopt(ch, Z_LVAL_PP(zoption), zvalue, return_value TSRMLS_CC)) { RETURN_TRUE; Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-03-02 12:33:45 UTC (rev 295730) +++ php/php-src/branches/PHP_5_3/NEWS 2010-03-02 12:54:23 UTC (rev 295731) @@ -6,6 +6,8 @@ - Added stream filter support to mcrypt extension (ported from mcrypt_filter). (Stas) +- Fixed bug #51171 (curl_setopt() doesn't output any errors or warnings when + an invalid option is provided). (Ilia) ?? ??? 20??, PHP 5.3.2 - Upgraded bundled sqlite to version 3.6.22. (Ilia) Modified: php/php-src/branches/PHP_5_3/ext/curl/interface.c === --- php/php-src/branches/PHP_5_3/ext/curl/interface.c 2010-03-02 12:33:45 UTC (rev 295730) +++ php/php-src/branches/PHP_5_3/ext/curl/interface.c 2010-03-02 12:54:23 UTC (rev 295731) @@ -2095,6 +2095,11 @@ ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); + if (options = 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid curl configuration option); + RETURN_FALSE; + } + if (!_php_curl_setopt(ch, options, zvalue, return_value TSRMLS_CC)) { RETURN_TRUE; } else { Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2010-03-02 12:33:45 UTC (rev 295730) +++ php/php-src/trunk/ext/curl/interface.c 2010-03-02 12:54:23 UTC (rev 295731) @@ -2164,6 +2164,11 @@ ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); + if (options = 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid curl configuration option); + RETURN_FALSE; + } + if (!_php_curl_setopt(ch, options, zvalue, return_value TSRMLS_CC)) { RETURN_TRUE; } else { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/curl/interface.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/curl/interface.c trunk/ext/curl/interface.c
iliaaMon, 26 Oct 2009 12:57:01 + Revision: http://svn.php.net/viewvc?view=revisionrevision=289934 Log: Fixed bug #49921 (Curl post upload functions changed). Bug: http://bugs.php.net/49921 (Assigned) Curl post upload functions changed Changed paths: U php/php-src/branches/PHP_5_2/NEWS U php/php-src/branches/PHP_5_2/ext/curl/interface.c U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/curl/interface.c U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/branches/PHP_5_2/NEWS === --- php/php-src/branches/PHP_5_2/NEWS 2009-10-26 12:50:42 UTC (rev 289933) +++ php/php-src/branches/PHP_5_2/NEWS 2009-10-26 12:57:01 UTC (rev 289934) @@ -16,6 +16,7 @@ (Jani) - Fixed bug #49985 (pdo_pgsql prepare() re-use previous aborted transaction). (ben dot pineau at gmail dot com, Ilia) +- Fixed bug #49921 (Curl post upload functions changed). (Ilia) - Fixed bug #49972 (AppendIterator undefined function crash). (Johannes) - Fixed bug #49855 (import_request_variables() always returns NULL). (Ilia, sjoerd at php dot net) Modified: php/php-src/branches/PHP_5_2/ext/curl/interface.c === --- php/php-src/branches/PHP_5_2/ext/curl/interface.c 2009-10-26 12:50:42 UTC (rev 289933) +++ php/php-src/branches/PHP_5_2/ext/curl/interface.c 2009-10-26 12:57:01 UTC (rev 289934) @@ -1625,7 +1625,7 @@ error = curl_formadd(first, last, CURLFORM_COPYNAME, string_key, CURLFORM_NAMELENGTH, (long)string_key_len - 1, - CURLFORM_FILENAME, filename ? filename : postval, + CURLFORM_FILENAME, filename ? filename + sizeof(;filename=) - 1 : postval, CURLFORM_CONTENTTYPE, type ? type + sizeof(;type=) - 1 : application/octet-stream, CURLFORM_FILE, postval, CURLFORM_END); Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2009-10-26 12:50:42 UTC (rev 289933) +++ php/php-src/branches/PHP_5_3/NEWS 2009-10-26 12:57:01 UTC (rev 289934) @@ -15,6 +15,7 @@ (Jani) - Fixed bug #49985 (pdo_pgsql prepare() re-use previous aborted transaction). (ben dot pineau at gmail dot com, Ilia) +- Fixed bug #49921 (Curl post upload functions changed). (Ilia) - Fixed bug #49855 (import_request_variables() always returns NULL). (Ilia, sjoerd at php dot net) - Fixed bug #49800 (SimpleXML allow (un)serialize() calls without warning). Modified: php/php-src/branches/PHP_5_3/ext/curl/interface.c === --- php/php-src/branches/PHP_5_3/ext/curl/interface.c 2009-10-26 12:50:42 UTC (rev 289933) +++ php/php-src/branches/PHP_5_3/ext/curl/interface.c 2009-10-26 12:57:01 UTC (rev 289934) @@ -1946,7 +1946,7 @@ error = curl_formadd(first, last, CURLFORM_COPYNAME, string_key, CURLFORM_NAMELENGTH, (long)string_key_len - 1, - CURLFORM_FILENAME, filename ? filename : postval, + CURLFORM_FILENAME, filename ? filename + sizeof(;filename=) - 1 : postval, CURLFORM_CONTENTTYPE, type ? type + sizeof(;type=) - 1 : application/octet-stream, CURLFORM_FILE, postval, CURLFORM_END); Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2009-10-26 12:50:42 UTC (rev 289933) +++ php/php-src/trunk/ext/curl/interface.c 2009-10-26 12:57:01 UTC (rev 289934) @@ -2011,7 +2011,7 @@ error = curl_formadd(first, last, CURLFORM_COPYNAME,
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/curl/interface.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/curl/interface.c trunk/ext/curl/interface.c
srinatar Thu, 24 Sep 2009 18:20:49 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288677 Log: - Fixed bug #49571 (CURLOPT_POSTREDIR not implemented). Bug: http://bugs.php.net/49571 (Feedback) CURLOPT_POSTREDIR not implemented Changed paths: U php/php-src/branches/PHP_5_2/NEWS U php/php-src/branches/PHP_5_2/ext/curl/interface.c U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/curl/interface.c U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/branches/PHP_5_2/NEWS === --- php/php-src/branches/PHP_5_2/NEWS 2009-09-24 18:01:17 UTC (rev 288676) +++ php/php-src/branches/PHP_5_2/NEWS 2009-09-24 18:20:49 UTC (rev 288677) @@ -12,6 +12,8 @@ of a multibyte character). (Moriyoshi) - Fixed bug #49528 (UTF-16 strings prefixed by BOMs wrondly converted). (Moriyoshi) +- Fixed bug #49571 (CURLOPT_POSTREDIR not implemented). + (Sriram Natarajan) 17 Sep 2009, PHP 5.2.11 - Fixed certificate validation inside php_openssl_apply_verification_policy. Modified: php/php-src/branches/PHP_5_2/ext/curl/interface.c === --- php/php-src/branches/PHP_5_2/ext/curl/interface.c 2009-09-24 18:01:17 UTC (rev 288676) +++ php/php-src/branches/PHP_5_2/ext/curl/interface.c 2009-09-24 18:20:49 UTC (rev 288677) @@ -649,6 +649,10 @@ REGISTER_CURL_CONSTANT(CURLFTPSSL_ALL); #endif +#if LIBCURL_VERSION_NUM 0x071301 + REGISTER_CURL_CONSTANT(CURLOPT_POSTREDIR); +#endif + #if LIBCURL_VERSION_NUM = 0x071304 REGISTER_CURL_CONSTANT(CURLOPT_REDIR_PROTOCOLS); REGISTER_CURL_CONSTANT(CURLOPT_PROTOCOLS); @@ -1381,6 +1385,12 @@ } error = curl_easy_setopt(ch-cp, option, Z_LVAL_PP(zvalue)); break; +#if LIBCURL_VERSION_NUM 0x071301 + case CURLOPT_POSTREDIR: + convert_to_long_ex(zvalue); + error = curl_easy_setopt(ch-cp, CURLOPT_POSTREDIR, Z_LVAL_PP(zvalue) CURL_REDIR_POST_ALL); + break; +#endif case CURLOPT_PRIVATE: case CURLOPT_URL: case CURLOPT_PROXY: Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2009-09-24 18:01:17 UTC (rev 288676) +++ php/php-src/branches/PHP_5_3/NEWS 2009-09-24 18:20:49 UTC (rev 288677) @@ -10,6 +10,8 @@ - Fixed bug #49630 (imap_listscan function missing). (Felipe) - Fixed bug #49531 (CURLOPT_INFILESIZE sometimes causes warning CURLPROTO_FILE cannot be set). (Felipe) +- Fixed bug #49571 (CURLOPT_POSTREDIR not implemented). + (Sriram Natarajan) ?? ??? 2009, PHP 5.3.1RC? - WHY IS THIS HERE? Gonna be released after 5.3.1 or what?? Modified: php/php-src/branches/PHP_5_3/ext/curl/interface.c === --- php/php-src/branches/PHP_5_3/ext/curl/interface.c 2009-09-24 18:01:17 UTC (rev 288676) +++ php/php-src/branches/PHP_5_3/ext/curl/interface.c 2009-09-24 18:20:49 UTC (rev 288677) @@ -747,8 +747,10 @@ REGISTER_CURL_CONSTANT(CURLFTPSSL_CONTROL); REGISTER_CURL_CONSTANT(CURLFTPSSL_ALL); #endif + #if LIBCURL_VERSION_NUM 0x071301 REGISTER_CURL_CONSTANT(CURLOPT_CERTINFO); + REGISTER_CURL_CONSTANT(CURLOPT_POSTREDIR); #endif /* SSH support works in 7.19.0+ using libssh2 */ @@ -1669,6 +1671,12 @@ } error = curl_easy_setopt(ch-cp, option, Z_LVAL_PP(zvalue)); break; +#if LIBCURL_VERSION_NUM 0x071301 + case CURLOPT_POSTREDIR: + convert_to_long_ex(zvalue); + error = curl_easy_setopt(ch-cp, CURLOPT_POSTREDIR, Z_LVAL_PP(zvalue) CURL_REDIR_POST_ALL); + break; +#endif case CURLOPT_PRIVATE: case CURLOPT_URL: case CURLOPT_PROXY: Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2009-09-24 18:01:17 UTC (rev 288676) +++ php/php-src/trunk/ext/curl/interface.c 2009-09-24 18:20:49 UTC (rev 288677) @@ -767,6 +767,10 @@ REGISTER_CURL_CONSTANT(CURLE_SSH); #endif +#if LIBCURL_VERSION_NUM 0x071301 + REGISTER_CURL_CONSTANT(CURLOPT_POSTREDIR); +#endif + #if LIBCURL_VERSION_NUM = 0x071304 REGISTER_CURL_CONSTANT(CURLOPT_REDIR_PROTOCOLS); REGISTER_CURL_CONSTANT(CURLOPT_PROTOCOLS); @@ -1685,6 +1689,12 @@ } error = curl_easy_setopt(ch-cp, option, Z_LVAL_PP(zvalue)); break; +#if LIBCURL_VERSION_NUM 0x071301 + case
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/curl/interface.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/curl/interface.c trunk/ext/curl/interface.c
That's more of a feature then a bug report no? If so, it does not belong in 5.2 On 2009-09-24, at 2:20 PM, Sriram Natarajan wrote: srinatar Thu, 24 Sep 2009 18:20:49 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288677 Log: - Fixed bug #49571 (CURLOPT_POSTREDIR not implemented). Bug: http://bugs.php.net/49571 (Feedback) CURLOPT_POSTREDIR not implemented Changed paths: U php/php-src/branches/PHP_5_2/NEWS U php/php-src/branches/PHP_5_2/ext/curl/interface.c U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/curl/interface.c U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/branches/PHP_5_2/NEWS === --- php/php-src/branches/PHP_5_2/NEWS 2009-09-24 18:01:17 UTC (rev 288676) +++ php/php-src/branches/PHP_5_2/NEWS 2009-09-24 18:20:49 UTC (rev 288677) @@ -12,6 +12,8 @@ of a multibyte character). (Moriyoshi) - Fixed bug #49528 (UTF-16 strings prefixed by BOMs wrondly converted). (Moriyoshi) +- Fixed bug #49571 (CURLOPT_POSTREDIR not implemented). + (Sriram Natarajan) 17 Sep 2009, PHP 5.2.11 - Fixed certificate validation inside php_openssl_apply_verification_policy. Modified: php/php-src/branches/PHP_5_2/ext/curl/interface.c === --- php/php-src/branches/PHP_5_2/ext/curl/interface.c 2009-09-24 18:01:17 UTC (rev 288676) +++ php/php-src/branches/PHP_5_2/ext/curl/interface.c 2009-09-24 18:20:49 UTC (rev 288677) @@ -649,6 +649,10 @@ REGISTER_CURL_CONSTANT(CURLFTPSSL_ALL); #endif +#if LIBCURL_VERSION_NUM 0x071301 + REGISTER_CURL_CONSTANT(CURLOPT_POSTREDIR); +#endif + #if LIBCURL_VERSION_NUM = 0x071304 REGISTER_CURL_CONSTANT(CURLOPT_REDIR_PROTOCOLS); REGISTER_CURL_CONSTANT(CURLOPT_PROTOCOLS); @@ -1381,6 +1385,12 @@ } error = curl_easy_setopt(ch-cp, option, Z_LVAL_PP(zvalue)); break; +#if LIBCURL_VERSION_NUM 0x071301 + case CURLOPT_POSTREDIR: + convert_to_long_ex(zvalue); + error = curl_easy_setopt(ch-cp, CURLOPT_POSTREDIR, Z_LVAL_PP (zvalue) CURL_REDIR_POST_ALL); + break; +#endif case CURLOPT_PRIVATE: case CURLOPT_URL: case CURLOPT_PROXY: Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2009-09-24 18:01:17 UTC (rev 288676) +++ php/php-src/branches/PHP_5_3/NEWS 2009-09-24 18:20:49 UTC (rev 288677) @@ -10,6 +10,8 @@ - Fixed bug #49630 (imap_listscan function missing). (Felipe) - Fixed bug #49531 (CURLOPT_INFILESIZE sometimes causes warning CURLPROTO_FILE cannot be set). (Felipe) +- Fixed bug #49571 (CURLOPT_POSTREDIR not implemented). + (Sriram Natarajan) ?? ??? 2009, PHP 5.3.1RC? - WHY IS THIS HERE? Gonna be released after 5.3.1 or what?? Modified: php/php-src/branches/PHP_5_3/ext/curl/interface.c === --- php/php-src/branches/PHP_5_3/ext/curl/interface.c 2009-09-24 18:01:17 UTC (rev 288676) +++ php/php-src/branches/PHP_5_3/ext/curl/interface.c 2009-09-24 18:20:49 UTC (rev 288677) @@ -747,8 +747,10 @@ REGISTER_CURL_CONSTANT(CURLFTPSSL_CONTROL); REGISTER_CURL_CONSTANT(CURLFTPSSL_ALL); #endif + #if LIBCURL_VERSION_NUM 0x071301 REGISTER_CURL_CONSTANT(CURLOPT_CERTINFO); + REGISTER_CURL_CONSTANT(CURLOPT_POSTREDIR); #endif /* SSH support works in 7.19.0+ using libssh2 */ @@ -1669,6 +1671,12 @@ } error = curl_easy_setopt(ch-cp, option, Z_LVAL_PP(zvalue)); break; +#if LIBCURL_VERSION_NUM 0x071301 + case CURLOPT_POSTREDIR: + convert_to_long_ex(zvalue); + error = curl_easy_setopt(ch-cp, CURLOPT_POSTREDIR, Z_LVAL_PP (zvalue) CURL_REDIR_POST_ALL); + break; +#endif case CURLOPT_PRIVATE: case CURLOPT_URL: case CURLOPT_PROXY: Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2009-09-24 18:01:17 UTC (rev 288676) +++ php/php-src/trunk/ext/curl/interface.c 2009-09-24 18:20:49 UTC (rev 288677) @@ -767,6 +767,10 @@ REGISTER_CURL_CONSTANT(CURLE_SSH); #endif +#if LIBCURL_VERSION_NUM 0x071301 + REGISTER_CURL_CONSTANT(CURLOPT_POSTREDIR); +#endif + #if LIBCURL_VERSION_NUM = 0x071304 REGISTER_CURL_CONSTANT(CURLOPT_REDIR_PROTOCOLS); REGISTER_CURL_CONSTANT(CURLOPT_PROTOCOLS); @@ -1685,6 +1689,12 @@ } error = curl_easy_setopt(ch-cp, option, Z_LVAL_PP(zvalue));
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/curl/interface.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/curl/interface.c trunk/ext/curl/interface.c
felipe Wed, 23 Sep 2009 02:08:19 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288598 Log: - Fixed bug #49531 (CURLOPT_INFILESIZE sometimes causes warning CURLPROTO_FILE cannot be set ...) Bug: http://bugs.php.net/49531 (Open) CURLOPT_INFILESIZE sometimes causes warning CURLPROTO_FILE cannot be set Changed paths: U php/php-src/branches/PHP_5_2/NEWS U php/php-src/branches/PHP_5_2/ext/curl/interface.c U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/curl/interface.c U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/branches/PHP_5_2/NEWS === --- php/php-src/branches/PHP_5_2/NEWS 2009-09-23 00:18:32 UTC (rev 288597) +++ php/php-src/branches/PHP_5_2/NEWS 2009-09-23 02:08:19 UTC (rev 288598) @@ -3,6 +3,8 @@ ?? ??? , PHP 5.2.12 - Fixed bug #49630 (imap_listscan function missing). (Felipe) - Fixed bug #49578 (make install-pear fails). (Hannes) +- Fixed bug #49531 (CURLOPT_INFILESIZE sometimes causes warning CURLPROTO_FILE + cannot be set). (Felipe) 17 Sep 2009, PHP 5.2.11 - Fixed certificate validation inside php_openssl_apply_verification_policy. Modified: php/php-src/branches/PHP_5_2/ext/curl/interface.c === --- php/php-src/branches/PHP_5_2/ext/curl/interface.c 2009-09-23 00:18:32 UTC (rev 288597) +++ php/php-src/branches/PHP_5_2/ext/curl/interface.c 2009-09-23 02:08:19 UTC (rev 288598) @@ -1361,7 +1361,8 @@ #endif convert_to_long_ex(zvalue); #if LIBCURL_VERSION_NUM = 0x71304 - if (((PG(open_basedir) *PG(open_basedir)) || PG(safe_mode)) (Z_LVAL_PP(zvalue) CURLPROTO_FILE)) { + if ((option == CURLOPT_PROTOCOLS || option == CURLOPT_REDIR_PROTOCOLS) + ((PG(open_basedir) *PG(open_basedir)) || PG(safe_mode)) (Z_LVAL_PP(zvalue) CURLPROTO_FILE)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, CURLPROTO_FILE cannot be activated when in safe_mode or an open_basedir is set); RETVAL_FALSE; return 1; Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2009-09-23 00:18:32 UTC (rev 288597) +++ php/php-src/branches/PHP_5_3/NEWS 2009-09-23 02:08:19 UTC (rev 288598) @@ -7,6 +7,8 @@ (Linus Nielsen Feltzing li...@haxx.se) - Fixed bug #49630 (imap_listscan function missing). (Felipe) +- Fixed bug #49531 (CURLOPT_INFILESIZE sometimes causes warning CURLPROTO_FILE + cannot be set). (Felipe) ?? ??? 2009, PHP 5.3.1RC? - WHY IS THIS HERE? Gonna be released after 5.3.1 or what?? Modified: php/php-src/branches/PHP_5_3/ext/curl/interface.c === --- php/php-src/branches/PHP_5_3/ext/curl/interface.c 2009-09-23 00:18:32 UTC (rev 288597) +++ php/php-src/branches/PHP_5_3/ext/curl/interface.c 2009-09-23 02:08:19 UTC (rev 288598) @@ -1649,7 +1649,8 @@ #endif convert_to_long_ex(zvalue); #if LIBCURL_VERSION_NUM = 0x71304 - if (((PG(open_basedir) *PG(open_basedir)) || PG(safe_mode)) (Z_LVAL_PP(zvalue) CURLPROTO_FILE)) { + if ((option == CURLOPT_PROTOCOLS || option == CURLOPT_REDIR_PROTOCOLS) + ((PG(open_basedir) *PG(open_basedir)) || PG(safe_mode)) (Z_LVAL_PP(zvalue) CURLPROTO_FILE)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, CURLPROTO_FILE cannot be activated when in safe_mode or an open_basedir is set); RETVAL_FALSE; return 1; Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2009-09-23 00:18:32 UTC (rev 288597) +++ php/php-src/trunk/ext/curl/interface.c 2009-09-23 02:08:19 UTC (rev 288598) @@ -1665,7 +1665,8 @@ #endif convert_to_long_ex(zvalue); #if LIBCURL_VERSION_NUM = 0x71304 - if ((PG(open_basedir) *PG(open_basedir)) (Z_LVAL_PP(zvalue) CURLPROTO_FILE)) { + if ((option == CURLOPT_PROTOCOLS || option == CURLOPT_REDIR_PROTOCOLS) + (PG(open_basedir) *PG(open_basedir)) (Z_LVAL_PP(zvalue) CURLPROTO_FILE)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, CURLPROTO_FILE cannot be activated when open_basedir is set); RETVAL_FALSE; return 1; -- PHP CVS Mailing List (http://www.php.net/) To
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/curl/interface.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/curl/interface.c trunk/ext/curl/interface.c
pajoye Wed, 26 Aug 2009 22:24:10 + Revision: http://svn.php.net/viewvc?view=revisionrevision=287784 Log: - fix #49372, segfault in php_curl_option_url Bug: http://bugs.php.net/49372 (Assigned) Segfault in function php_curl_option_url Changed paths: U php/php-src/branches/PHP_5_2/NEWS U php/php-src/branches/PHP_5_2/ext/curl/interface.c U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/curl/interface.c U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/branches/PHP_5_2/NEWS === --- php/php-src/branches/PHP_5_2/NEWS 2009-08-26 21:59:54 UTC (rev 287783) +++ php/php-src/branches/PHP_5_2/NEWS 2009-08-26 22:24:10 UTC (rev 287784) @@ -20,6 +20,7 @@ defined as a file handle. (Ilia) - Fixed memory leak in stream_is_local(). (Felipe, Tony) +- Fixed bug #49372 (segfault in php_curl_option_curl). (Pierre) - Fixed bug #49132 (posix_times returns false without error). (phpbugs at gunnu dot us) - Fixed bug #49125 (Error in dba_exists C code). (jdornan at stanford dot edu) Modified: php/php-src/branches/PHP_5_2/ext/curl/interface.c === --- php/php-src/branches/PHP_5_2/ext/curl/interface.c 2009-08-26 21:59:54 UTC (rev 287783) +++ php/php-src/branches/PHP_5_2/ext/curl/interface.c 2009-08-26 22:24:10 UTC (rev 287784) @@ -183,7 +183,7 @@ return 0; } - if (!strncasecmp(file, uri-scheme, sizeof(file))) { + if (uri-scheme !strncasecmp(file, uri-scheme, sizeof(file))) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Protocol 'file' disabled in cURL); php_url_free(uri); return 0; Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2009-08-26 21:59:54 UTC (rev 287783) +++ php/php-src/branches/PHP_5_3/NEWS 2009-08-26 22:24:10 UTC (rev 287784) @@ -28,6 +28,7 @@ - Fixed memory leak in stream_is_local(). (Felipe, Tony) - Fixed BC break in mime_content_type(), removes the content encoding. (Scott) +- Fixed bug #49372 (segfault in php_curl_option_curl). (Pierre) - Fixed bug #49306 (inside pdo_mysql default socket settings are ignored). (Ilia) - Fixed bug #49289 (bcmath module doesn't compile with phpize configure). Modified: php/php-src/branches/PHP_5_3/ext/curl/interface.c === --- php/php-src/branches/PHP_5_3/ext/curl/interface.c 2009-08-26 21:59:54 UTC (rev 287783) +++ php/php-src/branches/PHP_5_3/ext/curl/interface.c 2009-08-26 22:24:10 UTC (rev 287784) @@ -183,7 +183,7 @@ return 0; } - if (!strncasecmp(file, uri-scheme, sizeof(file))) { + if (uri-scheme !strncasecmp(file, uri-scheme, sizeof(file))) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Protocol 'file' disabled in cURL); php_url_free(uri); return 0; Modified: php/php-src/trunk/ext/curl/interface.c === --- php/php-src/trunk/ext/curl/interface.c 2009-08-26 21:59:54 UTC (rev 287783) +++ php/php-src/trunk/ext/curl/interface.c 2009-08-26 22:24:10 UTC (rev 287784) @@ -183,7 +183,7 @@ return 0; } - if (!strncasecmp(file, uri-scheme, sizeof(file))) { + if (uri-scheme !strncasecmp(file, uri-scheme, sizeof(file))) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Protocol 'file' disabled in cURL); php_url_free(uri); return 0; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/curl/interface.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/curl/interface.c trunk/ext/curl/interface.c
jani Sat, 25 Jul 2009 20:44:19 + Revision: http://svn.php.net/viewvc?view=revisionrevision=286323 Log: - Fixed bug #48637 (file wrapper is overwritten when using --with-curlwrappers) # Also fixes bug #48603, basically same issue. Bugs: http://bugs.php.net/48637 (Assigned) file wrapper is overwritten when using --with-curlwrappers http://bugs.php.net/48603 (Open) Using --with-curlwrappers and open_basedir causes problems Changed paths: U php/php-src/branches/PHP_5_2/NEWS U php/php-src/branches/PHP_5_2/ext/curl/interface.c U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/curl/interface.c U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/branches/PHP_5_2/NEWS === --- php/php-src/branches/PHP_5_2/NEWS 2009-07-25 20:39:01 UTC (rev 286322) +++ php/php-src/branches/PHP_5_2/NEWS 2009-07-25 20:44:19 UTC (rev 286323) @@ -29,6 +29,8 @@ - Fixed bug #48693 (Double declaration of __lambda_func when lambda wrongly formatted). (peter at lvp-media dot com, Felipe) - Fixed bug #48661 (phpize is broken with non-bash shells). (Jani) +- Fixed bug #48637 (file fopen wrapper is overwritten when using + --with-curlwrappers). (Jani) - Fixed bug #48636 (Error compiling of ext/date on netware). (guenter at php.net, Ilia) - Fixed bug #48629 (get_defined_constants() ignores categorize parameter). Modified: php/php-src/branches/PHP_5_2/ext/curl/interface.c === --- php/php-src/branches/PHP_5_2/ext/curl/interface.c 2009-07-25 20:39:01 UTC (rev 286322) +++ php/php-src/branches/PHP_5_2/ext/curl/interface.c 2009-07-25 20:44:19 UTC (rev 286323) @@ -696,13 +696,24 @@ char **p = (char **)info-protocols; while (*p != NULL) { - php_register_url_stream_wrapper(*p++, php_curl_wrapper TSRMLS_CC); + /* Do not enable cURL file protocol and make sure cURL is always used when --with-curlwrappers is enabled */ + if (strncasecmp(*p, file, sizeof(file)-1) != 0) { + php_unregister_url_stream_wrapper(*p); + php_register_url_stream_wrapper(*p, php_curl_wrapper TSRMLS_CC); + } + (void) *p++; } } # else + php_unregister_url_stream_wrapper(http); php_register_url_stream_wrapper(http, php_curl_wrapper TSRMLS_CC); + php_unregister_url_stream_wrapper(https); php_register_url_stream_wrapper(https, php_curl_wrapper TSRMLS_CC); + php_unregister_url_stream_wrapper(ftp); php_register_url_stream_wrapper(ftp, php_curl_wrapper TSRMLS_CC); + php_unregister_url_stream_wrapper(ftps); + php_register_url_stream_wrapper(ftps, php_curl_wrapper TSRMLS_CC); + php_unregister_url_stream_wrapper(ldap); php_register_url_stream_wrapper(ldap, php_curl_wrapper TSRMLS_CC); # endif #endif Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2009-07-25 20:39:01 UTC (rev 286322) +++ php/php-src/branches/PHP_5_3/NEWS 2009-07-25 20:44:19 UTC (rev 286323) @@ -46,6 +46,8 @@ components). (Ilia) - Fixed bug #48681 (openssl signature verification for tar archives broken). (Greg) +- Fixed bug #48637 (file fopen wrapper is overwritten when using + --with-curlwrappers). (Jani) - Fixed bug #48377 (error message unclear on converting phar with existing file). (Greg) - Fixed bug #48247 (Infinite loop and possible crash during startup with Modified: php/php-src/branches/PHP_5_3/ext/curl/interface.c === --- php/php-src/branches/PHP_5_3/ext/curl/interface.c 2009-07-25 20:39:01 UTC (rev 286322) +++ php/php-src/branches/PHP_5_3/ext/curl/interface.c 2009-07-25 20:44:19 UTC (rev 286323) @@ -818,13 +818,24 @@ char **p = (char **)info-protocols; while (*p != NULL) { - php_register_url_stream_wrapper(*p++, php_curl_wrapper TSRMLS_CC); + /* Do not enable cURL file protocol and make sure cURL is always used when --with-curlwrappers is enabled */ + if (strncasecmp(*p, file, sizeof(file)-1) != 0) { + php_unregister_url_stream_wrapper(*p); + php_register_url_stream_wrapper(*p, php_curl_wrapper TSRMLS_CC); + } + (void) *p++; } } # else + php_unregister_url_stream_wrapper(http); php_register_url_stream_wrapper(http, php_curl_wrapper TSRMLS_CC); + php_unregister_url_stream_wrapper(https);
[PHP-CVS] svn: php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/curl/interface.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/curl/interface.c trunk/ext/curl/interface.c
iliaaTue, 21 Jul 2009 15:56:08 + Revision: http://svn.php.net/viewvc?view=revisionrevision=284546 Log: Fixed bug #48962 (cURL does not upload files with specified filename). Bug: http://bugs.php.net/48962 (Assigned) cURL does not upload files with specified filename Changed paths: U php/php-src/branches/PHP_5_2/NEWS U php/php-src/branches/PHP_5_2/ext/curl/interface.c U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/curl/interface.c U php/php-src/trunk/ext/curl/interface.c Modified: php/php-src/branches/PHP_5_2/NEWS === --- php/php-src/branches/PHP_5_2/NEWS 2009-07-21 14:44:58 UTC (rev 284545) +++ php/php-src/branches/PHP_5_2/NEWS 2009-07-21 15:56:08 UTC (rev 284546) @@ -5,6 +5,8 @@ defined as a file handle. (Ilia) - Fixed bug #48980 (Crash when compiling with pdo_firebird). (Felipe) +- Fixed bug #48962 (cURL does not upload files with specified filename). + (Ilia) - Fixed bug #48929 (Double \r\n after HTTP headers when header context option is an array). (David Zülke) - Fixed bug #48913 (Too long error code strings in pdo_odbc driver). Modified: php/php-src/branches/PHP_5_2/ext/curl/interface.c === --- php/php-src/branches/PHP_5_2/ext/curl/interface.c 2009-07-21 14:44:58 UTC (rev 284545) +++ php/php-src/branches/PHP_5_2/ext/curl/interface.c 2009-07-21 15:56:08 UTC (rev 284546) @@ -1573,33 +1573,33 @@ * must be explicitly cast to long in curl_formadd * use since curl needs a long not an int. */ if (*postval == '@') { - char *type; + char *type, *filename; ++postval; if ((type = php_memnstr(postval, ;type=, sizeof(;type=) - 1, postval + Z_STRLEN_PP(current { *type = '\0'; } + if ((filename = php_memnstr(postval, ;filename=, sizeof(;filename=) - 1, postval + Z_STRLEN_PP(current { + *filename = '\0'; + } /* safe_mode / open_basedir check */ if (php_check_open_basedir(postval TSRMLS_CC) || (PG(safe_mode) !php_checkuid(postval, rb+, CHECKUID_CHECK_MODE_PARAM))) { RETVAL_FALSE; return 1; } + error = curl_formadd(first, last, + CURLFORM_COPYNAME, string_key, + CURLFORM_NAMELENGTH, (long)string_key_len - 1, + CURLFORM_FILENAME, filename ? filename : postval, + CURLFORM_CONTENTTYPE, type ? type + sizeof(;type=) - 1 : application/octet-stream, + CURLFORM_FILE, postval, + CURLFORM_END); if (type) { - error = curl_formadd(first, last, - CURLFORM_COPYNAME, string_key, - CURLFORM_NAMELENGTH, (long)string_key_len - 1, - CURLFORM_FILE, postval, - CURLFORM_CONTENTTYPE, type + sizeof(;type=) - 1, - CURLFORM_END); *type = ';'; - } else { - error = curl_formadd(first, last, - CURLFORM_COPYNAME, string_key, -