mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Fixed bug #20796. $_GET/$_POST/$_COOKIE data can get overwritten when
register_globals are on and input contains arrays.
This commit is contained in:
parent
c087d9e9e4
commit
683251eba3
1 changed files with 6 additions and 6 deletions
|
@ -70,15 +70,15 @@ PHPAPI void php_register_variable_ex(char *var, zval *val, pval *track_vars_arra
|
|||
|
||||
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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue