[PHP-CVS] cvs: php-src /sapi/apache2handler php_functions.c
jorton Mon Jan 24 06:44:57 2005 EDT Modified files: /php-src/sapi/apache2handlerphp_functions.c Log: Fixed regression #31645 - only flush before running the subrequest. http://cvs.php.net/diff.php/php-src/sapi/apache2handler/php_functions.c?r1=1.16r2=1.17ty=u Index: php-src/sapi/apache2handler/php_functions.c diff -u php-src/sapi/apache2handler/php_functions.c:1.16 php-src/sapi/apache2handler/php_functions.c:1.17 --- php-src/sapi/apache2handler/php_functions.c:1.16Tue Jan 11 09:01:32 2005 +++ php-src/sapi/apache2handler/php_functions.c Mon Jan 24 06:44:56 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_functions.c,v 1.16 2005/01/11 14:01:32 jorton Exp $ */ +/* $Id: php_functions.c,v 1.17 2005/01/24 11:44:56 jorton Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -66,10 +66,6 @@ ctx = SG(server_context); - /* Ensure that the ap_r* layer is flushed, to work around 2.0 bug: -* http://issues.apache.org/bugzilla/show_bug.cgi?id=17629 */ - ap_rflush(ctx-r); - return ap_sub_req_lookup_uri(filename, ctx-r, ctx-r-output_filters); } @@ -102,6 +98,10 @@ php_end_ob_buffers(1 TSRMLS_CC); php_header(TSRMLS_C); + /* Ensure that the ap_r* layer for the main request is flushed, to +* work around http://issues.apache.org/bugzilla/show_bug.cgi?id=17629 */ + ap_rflush(rr-main); + if (ap_run_sub_req(rr)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - request execution failed, Z_STRVAL_PP(filename)); ap_destroy_sub_req(rr); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_0) /sapi/apache2handler php_functions.c
jorton Mon Jan 24 06:47:00 2005 EDT Modified files: (Branch: PHP_5_0) /php-src/sapi/apache2handlerphp_functions.c Log: MFH: Fixed regression #31645 - only flush before running the subrequest. http://cvs.php.net/diff.php/php-src/sapi/apache2handler/php_functions.c?r1=1.13.2.1r2=1.13.2.2ty=u Index: php-src/sapi/apache2handler/php_functions.c diff -u php-src/sapi/apache2handler/php_functions.c:1.13.2.1 php-src/sapi/apache2handler/php_functions.c:1.13.2.2 --- php-src/sapi/apache2handler/php_functions.c:1.13.2.1Tue Jan 11 09:07:27 2005 +++ php-src/sapi/apache2handler/php_functions.c Mon Jan 24 06:46:59 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_functions.c,v 1.13.2.1 2005/01/11 14:07:27 jorton Exp $ */ +/* $Id: php_functions.c,v 1.13.2.2 2005/01/24 11:46:59 jorton Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -66,10 +66,6 @@ ctx = SG(server_context); - /* Ensure that the ap_r* layer is flushed, to work around 2.0 bug: -* http://issues.apache.org/bugzilla/show_bug.cgi?id=17629 */ - ap_rflush(ctx-r); - return ap_sub_req_lookup_uri(filename, ctx-r, ctx-r-output_filters); } @@ -102,6 +98,10 @@ php_end_ob_buffers(1 TSRMLS_CC); php_header(TSRMLS_C); + /* Ensure that the ap_r* layer for the main request is flushed, to +* work around http://issues.apache.org/bugzilla/show_bug.cgi?id=17629 */ + ap_rflush(rr-main); + if (ap_run_sub_req(rr)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - request execution failed, Z_STRVAL_PP(filename)); ap_destroy_sub_req(rr); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /sapi/apache2handler php_functions.c
jorton Mon Jan 24 06:48:36 2005 EDT Modified files: (Branch: PHP_4_3) /php-src/sapi/apache2handlerphp_functions.c Log: MFH: Fixed regression #31645 - only flush before running the subrequest. http://cvs.php.net/diff.php/php-src/sapi/apache2handler/php_functions.c?r1=1.1.2.11r2=1.1.2.12ty=u Index: php-src/sapi/apache2handler/php_functions.c diff -u php-src/sapi/apache2handler/php_functions.c:1.1.2.11 php-src/sapi/apache2handler/php_functions.c:1.1.2.12 --- php-src/sapi/apache2handler/php_functions.c:1.1.2.11Tue Jan 11 09:09:56 2005 +++ php-src/sapi/apache2handler/php_functions.c Mon Jan 24 06:48:35 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_functions.c,v 1.1.2.11 2005/01/11 14:09:56 jorton Exp $ */ +/* $Id: php_functions.c,v 1.1.2.12 2005/01/24 11:48:35 jorton Exp $ */ #include php.h #include ext/standard/php_smart_str.h @@ -64,10 +64,6 @@ ctx = SG(server_context); - /* Ensure that the ap_r* layer is flushed, to work around 2.0 bug: -* http://issues.apache.org/bugzilla/show_bug.cgi?id=17629 */ - ap_rflush(ctx-r); - return ap_sub_req_lookup_uri(filename, ctx-r, ctx-r-output_filters); } @@ -100,6 +96,10 @@ php_end_ob_buffers(1 TSRMLS_CC); php_header(); + /* Ensure that the ap_r* layer for the main request is flushed, to +* work around http://issues.apache.org/bugzilla/show_bug.cgi?id=17629 */ + ap_rflush(rr-main); + if (ap_run_sub_req(rr)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - request execution failed, Z_STRVAL_PP(filename)); ap_destroy_sub_req(rr); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/sysvmsg sysvmsg.c
tony2001Mon Jan 24 09:12:01 2005 EDT Modified files: /php-src/ext/sysvmsgsysvmsg.c Log: fix msg_recieve() returning TRUE instead of FALSE when unserialize failed (patch by Andrey Hristov) http://cvs.php.net/diff.php/php-src/ext/sysvmsg/sysvmsg.c?r1=1.17r2=1.18ty=u Index: php-src/ext/sysvmsg/sysvmsg.c diff -u php-src/ext/sysvmsg/sysvmsg.c:1.17 php-src/ext/sysvmsg/sysvmsg.c:1.18 --- php-src/ext/sysvmsg/sysvmsg.c:1.17 Tue Sep 28 19:10:39 2004 +++ php-src/ext/sysvmsg/sysvmsg.c Mon Jan 24 09:12:01 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: sysvmsg.c,v 1.17 2004/09/28 23:10:39 helly Exp $ */ +/* $Id: sysvmsg.c,v 1.18 2005/01/24 14:12:01 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -142,7 +142,7 @@ { php_info_print_table_start(); php_info_print_table_row(2, sysvmsg support, enabled); - php_info_print_table_row(2, Revision, $Revision: 1.17 $); + php_info_print_table_row(2, Revision, $Revision: 1.18 $); php_info_print_table_end(); } /* }}} */ @@ -330,6 +330,7 @@ /* got it! */ ZVAL_LONG(out_msgtype, messagebuffer-mtype); + RETVAL_TRUE; if (do_unserialize) { php_unserialize_data_t var_hash; zval *tmp = NULL; @@ -347,7 +348,6 @@ } else { ZVAL_STRINGL(out_message, messagebuffer-mtext, result, 1); } - RETVAL_TRUE; } else if (zerrcode) { ZVAL_LONG(zerrcode, errno); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/sysvmsg/tests 002.phpt
tony2001Mon Jan 24 09:19:53 2005 EDT Added files: /php-src/ext/sysvmsg/tests 002.phpt Log: add test http://cvs.php.net/co.php/php-src/ext/sysvmsg/tests/002.phpt?r=1.1p=1 Index: php-src/ext/sysvmsg/tests/002.phpt +++ php-src/ext/sysvmsg/tests/002.phpt --TEST-- msg_recieve() should return false when unserialize() failed --SKIPIF-- ?php if (!extension_loaded(sysvmsg)) die(skip sysvmsg extenions is not available)? --FILE-- ?php $queue = msg_get_queue (ftok(__FILE__, 'r'), 0600); if (!msg_send ($queue, 1, 'Hi', false /* ! no_ser*/, true/*block*/, $msg_err)) { die(error\n); } var_dump($res = msg_receive ($queue, 1, $msg_type, 16384, $msg, true, 0, $msg_error)); echo Done\n; ? --EXPECTF-- Warning: msg_receive(): message corrupted in %s002.php on line %d bool(false) Done -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/sysvmsg sysvmsg.c /ext/sysvmsg/tests 002.phpt
tony2001Mon Jan 24 09:23:37 2005 EDT Added files: (Branch: PHP_4_3) /php-src/ext/sysvmsg/tests 002.phpt Modified files: /php-src/ext/sysvmsgsysvmsg.c Log: MFH: fix msg_recieve() add test http://cvs.php.net/diff.php/php-src/ext/sysvmsg/sysvmsg.c?r1=1.4.2.3r2=1.4.2.4ty=u Index: php-src/ext/sysvmsg/sysvmsg.c diff -u php-src/ext/sysvmsg/sysvmsg.c:1.4.2.3 php-src/ext/sysvmsg/sysvmsg.c:1.4.2.4 --- php-src/ext/sysvmsg/sysvmsg.c:1.4.2.3 Mon Sep 22 19:28:08 2003 +++ php-src/ext/sysvmsg/sysvmsg.c Mon Jan 24 09:23:36 2005 @@ -15,7 +15,7 @@ | Authors: Wez Furlong [EMAIL PROTECTED] | +--+ */ -/* $Id: sysvmsg.c,v 1.4.2.3 2003/09/22 23:28:08 iliaa Exp $ */ +/* $Id: sysvmsg.c,v 1.4.2.4 2005/01/24 14:23:36 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -120,7 +120,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, sysvmsg support, enabled); - php_info_print_table_row(2, Revision, $Revision: 1.4.2.3 $); + php_info_print_table_row(2, Revision, $Revision: 1.4.2.4 $); php_info_print_table_end(); } /* }}} */ @@ -307,6 +307,7 @@ /* got it! */ ZVAL_LONG(out_msgtype, messagebuffer-mtype); + RETVAL_TRUE; if (do_unserialize) { php_unserialize_data_t var_hash; zval *tmp = NULL; @@ -324,7 +325,6 @@ } else { ZVAL_STRINGL(out_message, messagebuffer-mtext, result, 1); } - RETVAL_TRUE; } else if (zerrcode) { ZVAL_LONG(zerrcode, errno); } http://cvs.php.net/co.php/php-src/ext/sysvmsg/tests/002.phpt?r=1.1p=1 Index: php-src/ext/sysvmsg/tests/002.phpt +++ php-src/ext/sysvmsg/tests/002.phpt --TEST-- msg_recieve() should return false when unserialize() failed --SKIPIF-- ?php if (!extension_loaded(sysvmsg)) die(skip sysvmsg extenions is not available)? --FILE-- ?php $queue = msg_get_queue (ftok(__FILE__, 'r'), 0600); if (!msg_send ($queue, 1, 'Hi', false /* ! no_ser*/, true/*block*/, $msg_err)) { die(error\n); } var_dump($res = msg_receive ($queue, 1, $msg_type, 16384, $msg, true, 0, $msg_error)); echo Done\n; ? --EXPECTF-- Warning: msg_receive(): message corrupted in %s002.php on line %d bool(false) Done -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_0) /ext/sysvmsg sysvmsg.c /ext/sysvmsg/tests 002.phpt
tony2001Mon Jan 24 09:25:16 2005 EDT Added files: (Branch: PHP_5_0) /php-src/ext/sysvmsg/tests 002.phpt Modified files: /php-src/ext/sysvmsgsysvmsg.c Log: MFH: fix msg_recieve() and add test http://cvs.php.net/diff.php/php-src/ext/sysvmsg/sysvmsg.c?r1=1.16r2=1.16.2.1ty=u Index: php-src/ext/sysvmsg/sysvmsg.c diff -u php-src/ext/sysvmsg/sysvmsg.c:1.16 php-src/ext/sysvmsg/sysvmsg.c:1.16.2.1 --- php-src/ext/sysvmsg/sysvmsg.c:1.16 Thu Jan 8 03:17:37 2004 +++ php-src/ext/sysvmsg/sysvmsg.c Mon Jan 24 09:25:16 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: sysvmsg.c,v 1.16 2004/01/08 08:17:37 andi Exp $ */ +/* $Id: sysvmsg.c,v 1.16.2.1 2005/01/24 14:25:16 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -142,7 +142,7 @@ { php_info_print_table_start(); php_info_print_table_row(2, sysvmsg support, enabled); - php_info_print_table_row(2, Revision, $Revision: 1.16 $); + php_info_print_table_row(2, Revision, $Revision: 1.16.2.1 $); php_info_print_table_end(); } /* }}} */ @@ -330,6 +330,7 @@ /* got it! */ ZVAL_LONG(out_msgtype, messagebuffer-mtype); + RETVAL_TRUE; if (do_unserialize) { php_unserialize_data_t var_hash; zval *tmp = NULL; @@ -347,7 +348,6 @@ } else { ZVAL_STRINGL(out_message, messagebuffer-mtext, result, 1); } - RETVAL_TRUE; } else if (zerrcode) { ZVAL_LONG(zerrcode, errno); } http://cvs.php.net/co.php/php-src/ext/sysvmsg/tests/002.phpt?r=1.1p=1 Index: php-src/ext/sysvmsg/tests/002.phpt +++ php-src/ext/sysvmsg/tests/002.phpt --TEST-- msg_recieve() should return false when unserialize() failed --SKIPIF-- ?php if (!extension_loaded(sysvmsg)) die(skip sysvmsg extenions is not available)? --FILE-- ?php $queue = msg_get_queue (ftok(__FILE__, 'r'), 0600); if (!msg_send ($queue, 1, 'Hi', false /* ! no_ser*/, true/*block*/, $msg_err)) { die(error\n); } var_dump($res = msg_receive ($queue, 1, $msg_type, 16384, $msg, true, 0, $msg_error)); echo Done\n; ? --EXPECTF-- Warning: msg_receive(): message corrupted in %s002.php on line %d bool(false) Done -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /main rfc1867.c
moriyoshi Mon Jan 24 11:47:19 2005 EDT Modified files: /php-src/main rfc1867.c Log: - Revert irrelevant part. http://cvs.php.net/diff.php/php-src/main/rfc1867.c?r1=1.166r2=1.167ty=u Index: php-src/main/rfc1867.c diff -u php-src/main/rfc1867.c:1.166 php-src/main/rfc1867.c:1.167 --- php-src/main/rfc1867.c:1.166Thu Jan 20 12:44:58 2005 +++ php-src/main/rfc1867.c Mon Jan 24 11:47:18 2005 @@ -6,7 +6,6 @@ +--+ | This source file is subject to version 3.0 of the PHP license, | | that is bundled with this package in the file LICENSE, and is| - | available through the world-wide-web at the following url: | | http://www.php.net/license/3_0.txt. | | If you did not receive a copy of the PHP license and are unable to | @@ -18,7 +17,7 @@ +--+ */ -/* $Id: rfc1867.c,v 1.166 2005/01/20 17:44:58 iliaa Exp $ */ +/* $Id: rfc1867.c,v 1.167 2005/01/24 16:47:18 moriyoshi Exp $ */ /* * This product includes software developed by the Apache Group @@ -33,7 +32,6 @@ #include php_globals.h #include php_variables.h #include rfc1867.h -#include ext/standard/php_string.h #define DEBUG_FILE_UPLOAD ZEND_DEBUG @@ -849,7 +847,7 @@ while (!multipart_buffer_eof(mbuff TSRMLS_CC)) { char buff[FILLUNIT]; - char *cd=NULL,*param=NULL,*filename=NULL; + char *cd=NULL,*param=NULL,*filename=NULL, *tmp=NULL; int blen=0, wlen=0; zend_llist_clean(header); @@ -1079,16 +1077,30 @@ str_len = strlen(filename); php_mb_gpc_encoding_converter(filename, str_len, 1, NULL, NULL TSRMLS_CC); } + s = php_mb_strrchr(filename, '\\' TSRMLS_CC); + if ((tmp = php_mb_strrchr(filename, '/' TSRMLS_CC)) s) { + s = tmp; + } num_vars--; + } else { + s = strrchr(filename, '\\'); + if ((tmp = strrchr(filename, '/')) s) { + s = tmp; + } + } +#else + s = strrchr(filename, '\\'); + if ((tmp = strrchr(filename, '/')) s) { + s = tmp; } #endif - /* ensure that the uploaded file name only contains the path */ - php_basename(filename, strlen(filename), NULL, 0, s, NULL TSRMLS_CC); - efree(filename); - filename = s; - + if (!is_anonymous) { - safe_php_register_variable(lbuf, filename, NULL, 0 TSRMLS_CC); + if (s s filename) { + safe_php_register_variable(lbuf, s+1, NULL, 0 TSRMLS_CC); + } else { + safe_php_register_variable(lbuf, filename, NULL, 0 TSRMLS_CC); + } } /* Add $foo[name] */ @@ -1097,7 +1109,11 @@ } else { sprintf(lbuf, %s[name], param); } - register_http_post_files_variable(lbuf, filename, http_post_files, 0 TSRMLS_CC); + if (s s filename) { + register_http_post_files_variable(lbuf, s+1, http_post_files, 0 TSRMLS_CC); + } else { + register_http_post_files_variable(lbuf, filename, http_post_files, 0 TSRMLS_CC); + } efree(filename); s = NULL; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_0) /main rfc1867.c
moriyoshi Mon Jan 24 11:47:40 2005 EDT Modified files: (Branch: PHP_5_0) /php-src/main rfc1867.c Log: - MFH: revert irrelevant part. http://cvs.php.net/diff.php/php-src/main/rfc1867.c?r1=1.159.2.7r2=1.159.2.8ty=u Index: php-src/main/rfc1867.c diff -u php-src/main/rfc1867.c:1.159.2.7 php-src/main/rfc1867.c:1.159.2.8 --- php-src/main/rfc1867.c:1.159.2.7Thu Jan 20 12:57:06 2005 +++ php-src/main/rfc1867.c Mon Jan 24 11:47:39 2005 @@ -6,7 +6,6 @@ +--+ | This source file is subject to version 3.0 of the PHP license, | | that is bundled with this package in the file LICENSE, and is| - | available through the world-wide-web at the following url: | | http://www.php.net/license/3_0.txt. | | If you did not receive a copy of the PHP license and are unable to | @@ -18,7 +17,7 @@ +--+ */ -/* $Id: rfc1867.c,v 1.159.2.7 2005/01/20 17:57:06 iliaa Exp $ */ +/* $Id: rfc1867.c,v 1.159.2.8 2005/01/24 16:47:39 moriyoshi Exp $ */ /* * This product includes software developed by the Apache Group @@ -33,7 +32,6 @@ #include php_globals.h #include php_variables.h #include rfc1867.h -#include ext/standard/php_string.h #define DEBUG_FILE_UPLOAD ZEND_DEBUG @@ -849,7 +847,7 @@ while (!multipart_buffer_eof(mbuff TSRMLS_CC)) { char buff[FILLUNIT]; - char *cd=NULL,*param=NULL,*filename=NULL; + char *cd=NULL,*param=NULL,*filename=NULL, *tmp=NULL; int blen=0, wlen=0; zend_llist_clean(header); @@ -1079,16 +1077,30 @@ str_len = strlen(filename); php_mb_gpc_encoding_converter(filename, str_len, 1, NULL, NULL TSRMLS_CC); } + s = php_mb_strrchr(filename, '\\' TSRMLS_CC); + if ((tmp = php_mb_strrchr(filename, '/' TSRMLS_CC)) s) { + s = tmp; + } num_vars--; + } else { + s = strrchr(filename, '\\'); + if ((tmp = strrchr(filename, '/')) s) { + s = tmp; + } + } +#else + s = strrchr(filename, '\\'); + if ((tmp = strrchr(filename, '/')) s) { + s = tmp; } #endif - /* ensure that the uploaded file name only contains the path */ - php_basename(filename, strlen(filename), NULL, 0, s, NULL TSRMLS_CC); - efree(filename); - filename = s; - + if (!is_anonymous) { - safe_php_register_variable(lbuf, filename, NULL, 0 TSRMLS_CC); + if (s s filename) { + safe_php_register_variable(lbuf, s+1, NULL, 0 TSRMLS_CC); + } else { + safe_php_register_variable(lbuf, filename, NULL, 0 TSRMLS_CC); + } } /* Add $foo[name] */ @@ -1097,7 +1109,11 @@ } else { sprintf(lbuf, %s[name], param); } - register_http_post_files_variable(lbuf, filename, http_post_files, 0 TSRMLS_CC); + if (s s filename) { + register_http_post_files_variable(lbuf, s+1, http_post_files, 0 TSRMLS_CC); + } else { + register_http_post_files_variable(lbuf, filename, http_post_files, 0 TSRMLS_CC); + } efree(filename); s = NULL; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /main rfc1867.c
moriyoshi Mon Jan 24 11:47:53 2005 EDT Modified files: (Branch: PHP_4_3) /php-src/main rfc1867.c Log: - MFH: revert irrelevant part. http://cvs.php.net/diff.php/php-src/main/rfc1867.c?r1=1.122.2.29r2=1.122.2.30ty=u Index: php-src/main/rfc1867.c diff -u php-src/main/rfc1867.c:1.122.2.29 php-src/main/rfc1867.c:1.122.2.30 --- php-src/main/rfc1867.c:1.122.2.29 Thu Jan 20 12:57:41 2005 +++ php-src/main/rfc1867.c Mon Jan 24 11:47:53 2005 @@ -16,7 +16,7 @@ | Jani Taskinen [EMAIL PROTECTED] | +--+ */ -/* $Id: rfc1867.c,v 1.122.2.29 2005/01/20 17:57:41 iliaa Exp $ */ +/* $Id: rfc1867.c,v 1.122.2.30 2005/01/24 16:47:53 moriyoshi Exp $ */ /* * This product includes software developed by the Apache Group @@ -31,7 +31,6 @@ #include php_globals.h #include php_variables.h #include rfc1867.h -#include ext/standard/php_string.h #undef DEBUG_FILE_UPLOAD @@ -843,7 +842,7 @@ while (!multipart_buffer_eof(mbuff TSRMLS_CC)) { char buff[FILLUNIT]; - char *cd=NULL,*param=NULL,*filename=NULL; + char *cd=NULL,*param=NULL,*filename=NULL, *tmp=NULL; int blen=0, wlen=0; zend_llist_clean(header); @@ -1065,14 +1064,23 @@ str_len = strlen(filename); php_mb_gpc_encoding_converter(filename, str_len, 1, NULL, NULL TSRMLS_CC); } + s = php_mb_strrchr(filename, '\\' TSRMLS_CC); + if ((tmp = php_mb_strrchr(filename, '/' TSRMLS_CC)) s) { + s = tmp; + } num_vars--; + } else { + s = strrchr(filename, '\\'); + if ((tmp = strrchr(filename, '/')) s) { + s = tmp; + } + } +#else + s = strrchr(filename, '\\'); + if ((tmp = strrchr(filename, '/')) s) { + s = tmp; } #endif - /* ensure that the uploaded file name only contains the path */ - s = php_basename(filename, strlen(filename), NULL, 0); - efree(filename); - filename = s; - if (s s filename) { safe_php_register_variable(lbuf, s+1, NULL, 0 TSRMLS_CC); } else { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /main rfc1867.c
I can understand your reasoning for wanting to changing the multibyte specific code, but why is the non-multibyte related code being altered? You also effectively re-introduced a bug that Stefan's fix addressed, which was escape char (\) being considered to be part of the path when magic_quotes_gpc is enabled. If multibyte languages require special handling, that's fine and is perfectly understandable. However, let's keep the security patches in and have generic non-multibyte behavior that does not cause unnecessary filename pruning. Ilia Moriyoshi Koizumi wrote: moriyoshi Mon Jan 24 11:47:19 2005 EDT Modified files: /php-src/main rfc1867.c Log: - Revert irrelevant part. http://cvs.php.net/diff.php/php-src/main/rfc1867.c?r1=1.166r2=1.167ty=u Index: php-src/main/rfc1867.c diff -u php-src/main/rfc1867.c:1.166 php-src/main/rfc1867.c:1.167 --- php-src/main/rfc1867.c:1.166 Thu Jan 20 12:44:58 2005 +++ php-src/main/rfc1867.c Mon Jan 24 11:47:18 2005 @@ -6,7 +6,6 @@ +--+ | This source file is subject to version 3.0 of the PHP license, | | that is bundled with this package in the file LICENSE, and is| - | available through the world-wide-web at the following url: | | http://www.php.net/license/3_0.txt. | | If you did not receive a copy of the PHP license and are unable to | @@ -18,7 +17,7 @@ +--+ */ -/* $Id: rfc1867.c,v 1.166 2005/01/20 17:44:58 iliaa Exp $ */ +/* $Id: rfc1867.c,v 1.167 2005/01/24 16:47:18 moriyoshi Exp $ */ /* * This product includes software developed by the Apache Group @@ -33,7 +32,6 @@ #include php_globals.h #include php_variables.h #include rfc1867.h -#include ext/standard/php_string.h #define DEBUG_FILE_UPLOAD ZEND_DEBUG @@ -849,7 +847,7 @@ while (!multipart_buffer_eof(mbuff TSRMLS_CC)) { char buff[FILLUNIT]; - char *cd=NULL,*param=NULL,*filename=NULL; + char *cd=NULL,*param=NULL,*filename=NULL, *tmp=NULL; int blen=0, wlen=0; zend_llist_clean(header); @@ -1079,16 +1077,30 @@ str_len = strlen(filename); php_mb_gpc_encoding_converter(filename, str_len, 1, NULL, NULL TSRMLS_CC); } +s = php_mb_strrchr(filename, '\\' TSRMLS_CC); +if ((tmp = php_mb_strrchr(filename, '/' TSRMLS_CC)) s) { + s = tmp; +} num_vars--; + } else { +s = strrchr(filename, '\\'); +if ((tmp = strrchr(filename, '/')) s) { + s = tmp; +} + } +#else + s = strrchr(filename, '\\'); + if ((tmp = strrchr(filename, '/')) s) { +s = tmp; } #endif - /* ensure that the uploaded file name only contains the path */ - php_basename(filename, strlen(filename), NULL, 0, s, NULL TSRMLS_CC); - efree(filename); - filename = s; - + if (!is_anonymous) { -safe_php_register_variable(lbuf, filename, NULL, 0 TSRMLS_CC); +if (s s filename) { + safe_php_register_variable(lbuf, s+1, NULL, 0 TSRMLS_CC); +} else { + safe_php_register_variable(lbuf, filename, NULL, 0 TSRMLS_CC); +} } /* Add $foo[name] */ @@ -1097,7 +1109,11 @@ } else { sprintf(lbuf, %s[name], param); } - register_http_post_files_variable(lbuf, filename, http_post_files, 0 TSRMLS_CC); + if (s s filename) { +register_http_post_files_variable(lbuf, s+1, http_post_files, 0 TSRMLS_CC); + } else { +register_http_post_files_variable(lbuf, filename, http_post_files, 0 TSRMLS_CC); + } efree(filename); s = NULL; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] Notice again
You have downloaded these illegal cracks?. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /main rfc1867.c
Hi, On 2005/01/25, at 1:59, Ilia Alshanetsky wrote: I can understand your reasoning for wanting to changing the multibyte specific code, but why is the non-multibyte related code being altered? You also effectively re-introduced a bug that Stefan's fix addressed, which was escape char (\) being considered to be part of the path when magic_quotes_gpc is enabled. While I wasn't informed at all there was such an issue addressed, I took it into consideration and couldn't replicate the problem with my patch. Can you please tell me the way I can go through that situation? If multibyte languages require special handling, that's fine and is perfectly understandable. However, let's keep the security patches in and have generic non-multibyte behavior that does not cause unnecessary filename pruning. It requires no special handling. But, if you'd needed to fix it, then you should have thought of a way to fix them altogether in the first place. Moriyoshi Ilia Moriyoshi Koizumi wrote: moriyoshi Mon Jan 24 11:47:19 2005 EDT Modified files: /php-src/main rfc1867.c Log: - Revert irrelevant part. http://cvs.php.net/diff.php/php-src/main/rfc1867.c? r1=1.166r2=1.167ty=u Index: php-src/main/rfc1867.c diff -u php-src/main/rfc1867.c:1.166 php-src/main/rfc1867.c:1.167 --- php-src/main/rfc1867.c:1.166 Thu Jan 20 12:44:58 2005 +++ php-src/main/rfc1867.c Mon Jan 24 11:47:18 2005 @@ -6,7 +6,6 @@ +- -+ | This source file is subject to version 3.0 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | | http://www.php.net/license/3_0.txt. | | If you did not receive a copy of the PHP license and are unable to | @@ -18,7 +17,7 @@ +- -+ */ -/* $Id: rfc1867.c,v 1.166 2005/01/20 17:44:58 iliaa Exp $ */ +/* $Id: rfc1867.c,v 1.167 2005/01/24 16:47:18 moriyoshi Exp $ */ /* * This product includes software developed by the Apache Group @@ -33,7 +32,6 @@ #include php_globals.h #include php_variables.h #include rfc1867.h -#include ext/standard/php_string.h #define DEBUG_FILE_UPLOAD ZEND_DEBUG @@ -849,7 +847,7 @@ while (!multipart_buffer_eof(mbuff TSRMLS_CC)) { char buff[FILLUNIT]; - char *cd=NULL,*param=NULL,*filename=NULL; + char *cd=NULL,*param=NULL,*filename=NULL, *tmp=NULL; int blen=0, wlen=0; zend_llist_clean(header); @@ -1079,16 +1077,30 @@ str_len = strlen(filename); php_mb_gpc_encoding_converter(filename, str_len, 1, NULL, NULL TSRMLS_CC); } +s = php_mb_strrchr(filename, '\\' TSRMLS_CC); +if ((tmp = php_mb_strrchr(filename, '/' TSRMLS_CC)) s) { + s = tmp; +} num_vars--; + } else { +s = strrchr(filename, '\\'); +if ((tmp = strrchr(filename, '/')) s) { + s = tmp; +} + } +#else + s = strrchr(filename, '\\'); + if ((tmp = strrchr(filename, '/')) s) { +s = tmp; } #endif - /* ensure that the uploaded file name only contains the path */ - php_basename(filename, strlen(filename), NULL, 0, s, NULL TSRMLS_CC); - efree(filename); - filename = s; - + if (!is_anonymous) { -safe_php_register_variable(lbuf, filename, NULL, 0 TSRMLS_CC); +if (s s filename) { + safe_php_register_variable(lbuf, s+1, NULL, 0 TSRMLS_CC); +} else { + safe_php_register_variable(lbuf, filename, NULL, 0 TSRMLS_CC); +} } /* Add $foo[name] */ @@ -1097,7 +1109,11 @@ } else { sprintf(lbuf, %s[name], param); } - register_http_post_files_variable(lbuf, filename, http_post_files, 0 TSRMLS_CC); + if (s s filename) { +register_http_post_files_variable(lbuf, s+1, http_post_files, 0 TSRMLS_CC); + } else { +register_http_post_files_variable(lbuf, filename, http_post_files, 0 TSRMLS_CC); + } efree(filename); s = NULL; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/spl spl_iterators.c
helly Mon Jan 24 15:21:11 2005 EDT Modified files: /php-src/ext/splspl_iterators.c Log: - bugfix 31348 http://cvs.php.net/diff.php/php-src/ext/spl/spl_iterators.c?r1=1.61r2=1.62ty=u Index: php-src/ext/spl/spl_iterators.c diff -u php-src/ext/spl/spl_iterators.c:1.61 php-src/ext/spl/spl_iterators.c:1.62 --- php-src/ext/spl/spl_iterators.c:1.61Wed Dec 29 11:11:42 2004 +++ php-src/ext/spl/spl_iterators.c Mon Jan 24 15:21:11 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: spl_iterators.c,v 1.61 2004/12/29 16:11:42 tony2001 Exp $ */ +/* $Id: spl_iterators.c,v 1.62 2005/01/24 20:21:11 helly Exp $ */ #ifdef HAVE_CONFIG_H # include config.h @@ -1282,6 +1282,7 @@ zval_copy_ctor(intern-u.caching.zstr); zval_dtor(expr_copy); } else { + INIT_PZVAL(intern-u.caching.zstr); zval_copy_ctor(intern-u.caching.zstr); } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/spl/tests bug31348.phpt
helly Mon Jan 24 15:22:56 2005 EDT Added files: /php-src/ext/spl/tests bug31348.phpt Log: - Add new test http://cvs.php.net/co.php/php-src/ext/spl/tests/bug31348.phpt?r=1.1p=1 Index: php-src/ext/spl/tests/bug31348.phpt +++ php-src/ext/spl/tests/bug31348.phpt --TEST-- Bug #31348 (CachingIterator::rewind() leaks) --FILE-- ?php $a = Array(some,blah); $i = new ArrayIterator($a); $ci = new CachingIterator($i); $ci-rewind(); ? ===DONE=== --EXPECT-- ===DONE=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_0) / NEWS /ext/spl spl_iterators.c /ext/spl/tests bug31348.phpt
helly Mon Jan 24 15:25:59 2005 EDT Added files: (Branch: PHP_5_0) /php-src/ext/spl/tests bug31348.phpt Modified files: /php-srcNEWS /php-src/ext/splspl_iterators.c Log: - MFH fix for bug #31348 CachingIterator::rewind() leaks http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.206r2=1.1760.2.207ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1760.2.206 php-src/NEWS:1.1760.2.207 --- php-src/NEWS:1.1760.2.206 Mon Jan 24 15:04:45 2005 +++ php-src/NEWSMon Jan 24 15:25:58 2005 @@ -21,6 +21,7 @@ - Fixed bug #31396 (compile fails with gd 2.0.33 without freetype). (Jani) - Fixed bug #31371 (highlight_file() trims new line after heredoc). (Ilia) - Fixed bug #31361 (simplexml/domxml segfault when adding node twice). (Rob) +- Fixed bug #31348 (CachingIterator::rewind() leaks). (Marcus) - Fixed bug #31190 (Unexpected warning then exception is thrown from call_user_func_array()). (phpbugs at domain51 dot net, Dmitry) - Fixed bug #31142 (imap_mail_compose() fails to generate correct output). (Ilia) http://cvs.php.net/diff.php/php-src/ext/spl/spl_iterators.c?r1=1.38.2.7r2=1.38.2.8ty=u Index: php-src/ext/spl/spl_iterators.c diff -u php-src/ext/spl/spl_iterators.c:1.38.2.7 php-src/ext/spl/spl_iterators.c:1.38.2.8 --- php-src/ext/spl/spl_iterators.c:1.38.2.7Wed Dec 29 11:12:55 2004 +++ php-src/ext/spl/spl_iterators.c Mon Jan 24 15:25:58 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: spl_iterators.c,v 1.38.2.7 2004/12/29 16:12:55 tony2001 Exp $ */ +/* $Id: spl_iterators.c,v 1.38.2.8 2005/01/24 20:25:58 helly Exp $ */ #ifdef HAVE_CONFIG_H # include config.h @@ -1172,6 +1172,7 @@ zval_copy_ctor(intern-u.caching.zstr); zval_dtor(expr_copy); } else { + INIT_PZVAL(intern-u.caching.zstr); zval_copy_ctor(intern-u.caching.zstr); } } http://cvs.php.net/co.php/php-src/ext/spl/tests/bug31348.phpt?r=1.1p=1 Index: php-src/ext/spl/tests/bug31348.phpt +++ php-src/ext/spl/tests/bug31348.phpt --TEST-- Bug #31348 (CachingIterator::rewind() leaks) --FILE-- ?php $a = Array(some,blah); $i = new ArrayIterator($a); $ci = new CachingIterator($i); $ci-rewind(); ? ===DONE=== --EXPECT-- ===DONE=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/spl doxygen.cfg
helly Mon Jan 24 16:13:52 2005 EDT Modified files: /php-src/ext/spldoxygen.cfg Log: - Update http://cvs.php.net/diff.php/php-src/ext/spl/doxygen.cfg?r1=1.3r2=1.4ty=u Index: php-src/ext/spl/doxygen.cfg diff -u php-src/ext/spl/doxygen.cfg:1.3 php-src/ext/spl/doxygen.cfg:1.4 --- php-src/ext/spl/doxygen.cfg:1.3 Mon Nov 1 13:11:38 2004 +++ php-src/ext/spl/doxygen.cfg Mon Jan 24 16:13:52 2005 @@ -9,7 +9,7 @@ CREATE_SUBDIRS = NO OUTPUT_LANGUAGE= English USE_WINDOWS_ENCODING = YES -BRIEF_MEMBER_DESC = +BRIEF_MEMBER_DESC = NO REPEAT_BRIEF = YES ABBREVIATE_BRIEF = ALWAYS_DETAILED_SEC= YES @@ -22,8 +22,8 @@ MULTILINE_CPP_IS_BRIEF = YES DETAILS_AT_TOP = NO INHERIT_DOCS = YES -DISTRIBUTE_GROUP_DOC = NO -TAB_SIZE = 8 +DISTRIBUTE_GROUP_DOC = YES +TAB_SIZE = 4 ALIASES= OPTIMIZE_OUTPUT_FOR_C = NO OPTIMIZE_OUTPUT_JAVA = NO @@ -96,8 +96,8 @@ #--- # configuration options related to the alphabetical class index #--- -ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX= 5 +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX= 4 IGNORE_PREFIX = #--- # configuration options related to the HTML output @@ -116,8 +116,8 @@ BINARY_TOC = NO TOC_EXPAND = NO DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = NO +ENUM_VALUES_PER_LINE = 1 +GENERATE_TREEVIEW = YES TREEVIEW_WIDTH = 250 #--- # configuration options related to the LaTeX output @@ -201,12 +201,12 @@ TEMPLATE_RELATIONS = NO INCLUDE_GRAPH = YES INCLUDED_BY_GRAPH = YES -CALL_GRAPH = NO +CALL_GRAPH = YES GRAPHICAL_HIERARCHY= YES DOT_IMAGE_FORMAT = png DOT_PATH = DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH= 1024 +MAX_DOT_GRAPH_WIDTH= 1200 MAX_DOT_GRAPH_HEIGHT = 1024 MAX_DOT_GRAPH_DEPTH= 0 GENERATE_LEGEND= YES -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/spl/tests bug31346.phpt
helly Mon Jan 24 16:27:36 2005 EDT Added files: /php-src/ext/spl/tests bug31346.phpt Log: - Bugfix #31346 http://cvs.php.net/co.php/php-src/ext/spl/tests/bug31346.phpt?r=1.1p=1 Index: php-src/ext/spl/tests/bug31346.phpt +++ php-src/ext/spl/tests/bug31346.phpt --TEST-- Bug #31486 (ArrayIterator::next segfaults) --FILE-- ?php $obj = new stdClass; $obj-var1=1; $ao = new ArrayObject($obj); $i = $ao-getIterator(); $ao-offsetUnset($i-key()); $i-next(); ? ===DONE=== --EXPECTF-- Notice: ArrayIterator::next(): Array was modified outside object and internal position is no longer valid in %sbug31346.php on line %d ===DONE=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/spl/tests bug28822.phpt
helly Mon Jan 24 16:28:56 2005 EDT Modified files: /php-src/ext/spl/tests bug28822.phpt Log: - Unify http://cvs.php.net/diff.php/php-src/ext/spl/tests/bug28822.phpt?r1=1.2r2=1.3ty=u Index: php-src/ext/spl/tests/bug28822.phpt diff -u php-src/ext/spl/tests/bug28822.phpt:1.2 php-src/ext/spl/tests/bug28822.phpt:1.3 --- php-src/ext/spl/tests/bug28822.phpt:1.2 Wed Sep 29 16:10:12 2004 +++ php-src/ext/spl/tests/bug28822.phpt Mon Jan 24 16:28:56 2005 @@ -1,5 +1,5 @@ --TEST-- -Bug #28822: ArrayObject::offsetExists() works inverted +Bug #28822 (ArrayObject::offsetExists() works inverted) --SKIPIF-- ?php if (!extension_loaded(spl)) print skip; ? --FILE-- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_0) /ext/spl spl_array.c /ext/spl/tests bug28822.phpt bug31346.phpt
helly Mon Jan 24 16:38:30 2005 EDT Added files: (Branch: PHP_5_0) /php-src/ext/spl/tests bug31346.phpt Modified files: /php-src/ext/splspl_array.c /php-src/ext/spl/tests bug28822.phpt Log: - MFH http://cvs.php.net/diff.php/php-src/ext/spl/spl_array.c?r1=1.49.2.1r2=1.49.2.2ty=u Index: php-src/ext/spl/spl_array.c diff -u php-src/ext/spl/spl_array.c:1.49.2.1 php-src/ext/spl/spl_array.c:1.49.2.2 --- php-src/ext/spl/spl_array.c:1.49.2.1Tue Aug 31 16:56:08 2004 +++ php-src/ext/spl/spl_array.c Mon Jan 24 16:38:29 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: spl_array.c,v 1.49.2.1 2004/08/31 20:56:08 helly Exp $ */ +/* $Id: spl_array.c,v 1.49.2.2 2005/01/24 21:38:29 helly Exp $ */ #ifdef HAVE_CONFIG_H # include config.h @@ -26,6 +26,7 @@ #include php_ini.h #include ext/standard/info.h #include zend_interfaces.h +#include zend_exceptions.h #include php_spl.h #include spl_functions.h @@ -119,6 +120,7 @@ zend_object std; zval *array; HashPosition pos; + int is_ref; } spl_array_object; /* {{{ spl_array_object_free_storage */ @@ -154,9 +156,11 @@ if (orig) { intern-array = orig-array; ZVAL_ADDREF(intern-array); + intern-is_ref = 1; } else { MAKE_STD_ZVAL(intern-array); array_init(intern-array); + intern-is_ref = 0; } zend_hash_internal_pointer_reset_ex(HASH_OF(intern-array), intern-pos); @@ -365,20 +369,12 @@ spl_array_write_dimension(getThis(), index, value TSRMLS_CC); } /* }}} */ -/* {{{ proto void ArrayObject::append(mixed $newval) - proto void ArrayIterator::append(mixed $newval) - Appends the value (cannot be called for objects). */ -SPL_METHOD(Array, append) + +void spl_array_iterator_append(zval *object, zval *append_value TSRMLS_DC) /* {{{ */ { - zval *object = getThis(); spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC); HashTable *aht = HASH_OF(intern-array); - zval *value; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, z, value) == FAILURE) { - return; - } - if (!aht) { php_error_docref(NULL TSRMLS_CC, E_NOTICE, Array was modified outside object and is no longer an array); return; @@ -388,12 +384,25 @@ php_error_docref(NULL TSRMLS_CC, E_ERROR, Cannot append properties to objects, use %s::offsetSet() instead, Z_OBJCE_P(object)-name); } - spl_array_write_dimension(object, NULL, value TSRMLS_CC); + spl_array_write_dimension(object, NULL, append_value TSRMLS_CC); if (!intern-pos) { intern-pos = aht-pListTail; } } /* }}} */ +/* {{{ proto void ArrayObject::append(mixed $newval) + proto void ArrayIterator::append(mixed $newval) + Appends the value (cannot be called for objects). */ +SPL_METHOD(Array, append) +{ + zval *value; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, z, value) == FAILURE) { + return; + } + spl_array_iterator_append(getThis(), value TSRMLS_CC); +} /* }}} */ + /* {{{ proto void ArrayObject::offsetUnset(mixed $index) proto void ArrayIterator::offsetUnset(mixed $index) Unsets the value at the specified $index. */ @@ -478,11 +487,16 @@ { HashTable *aht = HASH_OF(intern-array); - zend_hash_move_forward_ex(aht, intern-pos); - if (Z_TYPE_P(intern-array) == IS_OBJECT) { - return spl_array_skip_protected(intern TSRMLS_CC); + if (intern-is_ref spl_hash_verify_pos(intern TSRMLS_CC) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_NOTICE, Array was modified outside object and internal position is no longer valid); + return FAILURE; } else { - return zend_hash_has_more_elements_ex(aht, intern-pos); + zend_hash_move_forward_ex(aht, intern-pos); + if (Z_TYPE_P(intern-array) == IS_OBJECT) { + return spl_array_skip_protected(intern TSRMLS_CC); + } else { + return zend_hash_has_more_elements_ex(aht, intern-pos); + } } } /* }}} */ @@ -513,7 +527,7 @@ return FAILURE; } - if (object-pos object-array-is_ref spl_hash_verify_pos(object TSRMLS_CC) == FAILURE) { + if (object-pos object-is_ref spl_hash_verify_pos(object TSRMLS_CC) == FAILURE) { php_error_docref(NULL TSRMLS_CC, E_NOTICE, ArrayIterator::valid(): Array was modified outside object and internal position is no longer valid); return FAILURE; } else { @@ -545,7 +559,7 @@ return
[PHP-CVS] cvs: php-src(PHP_5_0) / NEWS
helly Mon Jan 24 16:44:03 2005 EDT Modified files: (Branch: PHP_5_0) /php-srcNEWS Log: - BFN http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.207r2=1.1760.2.208ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1760.2.207 php-src/NEWS:1.1760.2.208 --- php-src/NEWS:1.1760.2.207 Mon Jan 24 15:25:58 2005 +++ php-src/NEWSMon Jan 24 16:44:03 2005 @@ -22,6 +22,7 @@ - Fixed bug #31371 (highlight_file() trims new line after heredoc). (Ilia) - Fixed bug #31361 (simplexml/domxml segfault when adding node twice). (Rob) - Fixed bug #31348 (CachingIterator::rewind() leaks). (Marcus) +- Fixed bug #31346 (ArrayIterator::next segfaults). (Marcus) - Fixed bug #31190 (Unexpected warning then exception is thrown from call_user_func_array()). (phpbugs at domain51 dot net, Dmitry) - Fixed bug #31142 (imap_mail_compose() fails to generate correct output). (Ilia) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_0) /ext/sysvmsg sysvmsg.c
iliaa Mon Jan 24 17:23:35 2005 EDT Modified files: (Branch: PHP_5_0) /php-src/ext/sysvmsgsysvmsg.c Log: Fixed compiler warning. http://cvs.php.net/diff.php/php-src/ext/sysvmsg/sysvmsg.c?r1=1.16.2.1r2=1.16.2.2ty=u Index: php-src/ext/sysvmsg/sysvmsg.c diff -u php-src/ext/sysvmsg/sysvmsg.c:1.16.2.1 php-src/ext/sysvmsg/sysvmsg.c:1.16.2.2 --- php-src/ext/sysvmsg/sysvmsg.c:1.16.2.1 Mon Jan 24 09:25:16 2005 +++ php-src/ext/sysvmsg/sysvmsg.c Mon Jan 24 17:23:35 2005 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: sysvmsg.c,v 1.16.2.1 2005/01/24 14:25:16 tony2001 Exp $ */ +/* $Id: sysvmsg.c,v 1.16.2.2 2005/01/24 22:23:35 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -142,7 +142,7 @@ { php_info_print_table_start(); php_info_print_table_row(2, sysvmsg support, enabled); - php_info_print_table_row(2, Revision, $Revision: 1.16.2.1 $); + php_info_print_table_row(2, Revision, $Revision: 1.16.2.2 $); php_info_print_table_end(); } /* }}} */ @@ -334,7 +334,7 @@ if (do_unserialize) { php_unserialize_data_t var_hash; zval *tmp = NULL; - const char *p = (const char *) messagebuffer-mtext; + const unsigned char *p = (const unsigned char *) messagebuffer-mtext; MAKE_STD_ZVAL(tmp); PHP_VAR_UNSERIALIZE_INIT(var_hash); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /main rfc1867.c
iliaa Mon Jan 24 17:35:24 2005 EDT Modified files: /php-src/main rfc1867.c Log: Use multibyte specific code for handling files and generic basename based code in all other instances. http://cvs.php.net/diff.php/php-src/main/rfc1867.c?r1=1.167r2=1.168ty=u Index: php-src/main/rfc1867.c diff -u php-src/main/rfc1867.c:1.167 php-src/main/rfc1867.c:1.168 --- php-src/main/rfc1867.c:1.167Mon Jan 24 11:47:18 2005 +++ php-src/main/rfc1867.c Mon Jan 24 17:35:23 2005 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: rfc1867.c,v 1.167 2005/01/24 16:47:18 moriyoshi Exp $ */ +/* $Id: rfc1867.c,v 1.168 2005/01/24 22:35:23 iliaa Exp $ */ /* * This product includes software developed by the Apache Group @@ -32,6 +32,7 @@ #include php_globals.h #include php_variables.h #include rfc1867.h +#include ext/standard/php_string.h #define DEBUG_FILE_UPLOAD ZEND_DEBUG @@ -1082,17 +1083,14 @@ s = tmp; } num_vars--; - } else { - s = strrchr(filename, '\\'); - if ((tmp = strrchr(filename, '/')) s) { - s = tmp; - } - } -#else - s = strrchr(filename, '\\'); - if ((tmp = strrchr(filename, '/')) s) { - s = tmp; + goto filedone; } +#endif + php_basename(filename, strlen(filename), NULL, 0, s, NULL TSRMLS_CC); + efree(filename); + filename = s; +#if HAVE_MBSTRING !defined(COMPILE_DL_MBSTRING) +filedone: #endif if (!is_anonymous) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_0) /main rfc1867.c
iliaa Mon Jan 24 17:41:41 2005 EDT Modified files: (Branch: PHP_5_0) /php-src/main rfc1867.c Log: MFH: Use multibyte specific code for handling files and generic basename based code in all other instances. http://cvs.php.net/diff.php/php-src/main/rfc1867.c?r1=1.159.2.8r2=1.159.2.9ty=u Index: php-src/main/rfc1867.c diff -u php-src/main/rfc1867.c:1.159.2.8 php-src/main/rfc1867.c:1.159.2.9 --- php-src/main/rfc1867.c:1.159.2.8Mon Jan 24 11:47:39 2005 +++ php-src/main/rfc1867.c Mon Jan 24 17:41:41 2005 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: rfc1867.c,v 1.159.2.8 2005/01/24 16:47:39 moriyoshi Exp $ */ +/* $Id: rfc1867.c,v 1.159.2.9 2005/01/24 22:41:41 iliaa Exp $ */ /* * This product includes software developed by the Apache Group @@ -32,6 +32,7 @@ #include php_globals.h #include php_variables.h #include rfc1867.h +#include ext/standard/php_string.h #define DEBUG_FILE_UPLOAD ZEND_DEBUG @@ -1082,18 +1083,19 @@ s = tmp; } num_vars--; - } else { - s = strrchr(filename, '\\'); - if ((tmp = strrchr(filename, '/')) s) { - s = tmp; - } - } -#else - s = strrchr(filename, '\\'); - if ((tmp = strrchr(filename, '/')) s) { - s = tmp; + goto filedone; } #endif + + /* ensure that the uploaded file name only contains the path */ + php_basename(filename, strlen(filename), NULL, 0, s, NULL TSRMLS_CC); + efree(filename); + filename = s; + +#if HAVE_MBSTRING !defined(COMPILE_DL_MBSTRING) +filedone: +#endif + if (!is_anonymous) { if (s s filename) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /main rfc1867.c
iliaa Mon Jan 24 18:52:29 2005 EDT Modified files: (Branch: PHP_4_3) /php-src/main rfc1867.c Log: MFH: Use multibyte specific code for handling files and generic basename based code in all other instances. http://cvs.php.net/diff.php/php-src/main/rfc1867.c?r1=1.122.2.30r2=1.122.2.31ty=u Index: php-src/main/rfc1867.c diff -u php-src/main/rfc1867.c:1.122.2.30 php-src/main/rfc1867.c:1.122.2.31 --- php-src/main/rfc1867.c:1.122.2.30 Mon Jan 24 11:47:53 2005 +++ php-src/main/rfc1867.c Mon Jan 24 18:52:27 2005 @@ -16,7 +16,7 @@ | Jani Taskinen [EMAIL PROTECTED] | +--+ */ -/* $Id: rfc1867.c,v 1.122.2.30 2005/01/24 16:47:53 moriyoshi Exp $ */ +/* $Id: rfc1867.c,v 1.122.2.31 2005/01/24 23:52:27 iliaa Exp $ */ /* * This product includes software developed by the Apache Group @@ -31,6 +31,7 @@ #include php_globals.h #include php_variables.h #include rfc1867.h +#include ext/standard/php_string.h #undef DEBUG_FILE_UPLOAD @@ -1069,18 +1070,17 @@ s = tmp; } num_vars--; - } else { - s = strrchr(filename, '\\'); - if ((tmp = strrchr(filename, '/')) s) { - s = tmp; - } - } -#else - s = strrchr(filename, '\\'); - if ((tmp = strrchr(filename, '/')) s) { - s = tmp; + goto filedone; } #endif + + /* ensure that the uploaded file name only contains the path */ + s = php_basename(filename, strlen(filename), NULL, 0); + efree(filename); + filename = s; +#if HAVE_MBSTRING !defined(COMPILE_DL_MBSTRING) +filedone: +#endif if (s s filename) { safe_php_register_variable(lbuf, s+1, NULL, 0 TSRMLS_CC); } else { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: CVSROOT / avail
wez Tue Jan 25 01:15:49 2005 EDT Modified files: /CVSROOTavail Log: colorer karma for Andrey Demenev (blindman) http://cvs.php.net/diff.php/CVSROOT/avail?r1=1.930r2=1.931ty=u Index: CVSROOT/avail diff -u CVSROOT/avail:1.930 CVSROOT/avail:1.931 --- CVSROOT/avail:1.930 Thu Jan 20 10:04:45 2005 +++ CVSROOT/avail Tue Jan 25 01:15:47 2005 @@ -248,6 +248,7 @@ avail|luckec|pear/HTTP_SessionServer,pear/Services_Ebay,pear/Date_Holidays avail|uw|pecl/maxdb avail|magnus|Zend/tests,ZendEngine2/tests +avail|blindman|pecl/colorer # Curl modules avail|bagder,sterling,crisb,linus_nielsen|curl,curl-cpp,curl-java,curl-perl,curl-php,curl-www -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php