iliaa Sat Dec 7 11:05:27 2002 EDT Modified files: /php4/main php_variables.c Log: Fixed bug #20796. $_GET/$_POST/$_COOKIE data can get overwritten when register_globals are on and input contains arrays. Index: php4/main/php_variables.c diff -u php4/main/php_variables.c:1.45 php4/main/php_variables.c:1.46 --- php4/main/php_variables.c:1.45 Sun Oct 13 04:38:09 2002 +++ php4/main/php_variables.c Sat Dec 7 11:05:27 2002 @@ -16,7 +16,7 @@ | Zeev Suraski <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: php_variables.c,v 1.45 2002/10/13 08:38:09 shane Exp $ */ +/* $Id: php_variables.c,v 1.46 2002/12/07 16:05:27 iliaa Exp $ */ #include <stdio.h> #include "php.h" @@ -70,15 +70,15 @@ assert(var != NULL); - if (PG(register_globals)) { - symtable1 = EG(active_symbol_table); - } if (track_vars_array) { + symtable1 = Z_ARRVAL_P(track_vars_array); + } + if (PG(register_globals)) { if (symtable1) { - symtable2 = Z_ARRVAL_P(track_vars_array); + symtable2 = EG(active_symbol_table); } else { - symtable1 = Z_ARRVAL_P(track_vars_array); - } + symtable1 = EG(active_symbol_table); + } } if (!symtable1) { /* Nothing to do */
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php