summaryrefslogtreecommitdiff
path: root/main/php_variables.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/php_variables.c')
-rw-r--r--main/php_variables.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/main/php_variables.c b/main/php_variables.c
index 4479d6cc77..a68abb0898 100644
--- a/main/php_variables.c
+++ b/main/php_variables.c
@@ -99,6 +99,13 @@ PHPAPI void php_register_variable_ex(char *var, zval *val, zval *track_vars_arra
zval_dtor(val);
return;
}
+
+ /* GLOBALS hijack attempt, reject parameter */
+ if (symtable1 == EG(active_symbol_table) && !strcmp("GLOBALS", var)) {
+ zval_dtor(val);
+ return;
+ }
+
/* ensure that we don't have spaces or dots in the variable name (not binary safe) */
for (p=var; *p; p++) {
switch (*p) {