iliaa Sun Jun 3 16:19:14 2007 UTC
Added files: (Branch: PHP_5_2)
/php-src/tests/basic 027.phpt
Modified files:
/php-src NEWS
/php-src/main php_variables.c
Log:
Improved fix for MOPB-02-2007
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.749&r2=1.2027.2.547.2.750&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.749 php-src/NEWS:1.2027.2.547.2.750
--- php-src/NEWS:1.2027.2.547.2.749 Fri Jun 1 13:35:23 2007
+++ php-src/NEWS Sun Jun 3 16:19:14 2007
@@ -1,6 +1,7 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2007, PHP 5.2.4
+- Improved fix for MOPB-02-2007. (Ilia)
- Fixed bug #41518 (file_exists() warns of open_basedir restriction on
non-existent file). (Tony)
- Fixed bug #39330 (apache2handler does not call shutdown actions before
http://cvs.php.net/viewvc.cgi/php-src/main/php_variables.c?r1=1.104.2.10.2.8&r2=1.104.2.10.2.9&diff_format=u
Index: php-src/main/php_variables.c
diff -u php-src/main/php_variables.c:1.104.2.10.2.8
php-src/main/php_variables.c:1.104.2.10.2.9
--- php-src/main/php_variables.c:1.104.2.10.2.8 Tue Apr 17 15:06:50 2007
+++ php-src/main/php_variables.c Sun Jun 3 16:19:14 2007
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_variables.c,v 1.104.2.10.2.8 2007/04/17 15:06:50 iliaa Exp $ */
+/* $Id: php_variables.c,v 1.104.2.10.2.9 2007/06/03 16:19:14 iliaa Exp $ */
#include <stdio.h>
#include "php.h"
@@ -125,8 +125,22 @@
int new_idx_len = 0;
if(++nest_level > PG(max_input_nesting_level)) {
+ HashTable *ht;
/* too many levels of nesting */
- php_error_docref(NULL TSRMLS_CC, E_ERROR,
"Input variable nesting level more than allowed %ld (change
max_input_nesting_level in php.ini to increase the limit)",
PG(max_input_nesting_level));
+
+ if (track_vars_array) {
+ ht = Z_ARRVAL_P(track_vars_array);
+ } else if (PG(register_globals)) {
+ ht = EG(active_symbol_table);
+ }
+
+ zend_hash_del(ht, var, var_len + 1);
+ zval_dtor(val);
+
+ if (!PG(display_errors)) {
+ php_error_docref(NULL TSRMLS_CC,
E_WARNING, "Input variable nesting level more than allowed %ld (change
max_input_nesting_level in php.ini to increase the limit)",
PG(max_input_nesting_level));
+ }
+ return;
}
ip++;
@@ -142,9 +156,9 @@
/* PHP variables cannot contain '[' in
their names, so we replace the character with a '_' */
*(index_s - 1) = '_';
- index_len = var_len = 0;
+ index_len = 0;
if (index) {
- index_len = var_len =
strlen(index);
+ index_len = strlen(index);
}
goto plain_var;
return;
http://cvs.php.net/viewvc.cgi/php-src/tests/basic/027.phpt?view=markup&rev=1.1
Index: php-src/tests/basic/027.phpt
+++ php-src/tests/basic/027.phpt
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php