diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2003-10-14 03:49:13 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2003-10-14 03:49:13 +0000 |
commit | 3c84c0eefcf751a3661d65f60238d83fbada9a8a (patch) | |
tree | a572111a57a0bb5f0431554d6d5e2dafa878455f /main/php_variables.c | |
parent | b6e65f0d37d34147177ddfa12c87c4dfb04afa64 (diff) | |
download | php-git-3c84c0eefcf751a3661d65f60238d83fbada9a8a.tar.gz |
Fixed bug #25836 (last key of multi-dimensional array passed via GPC
not being escaped when magic_quotes_gpc is on).
Diffstat (limited to 'main/php_variables.c')
-rw-r--r-- | main/php_variables.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/main/php_variables.c b/main/php_variables.c index 13e21b500c..78b1863fd9 100644 --- a/main/php_variables.c +++ b/main/php_variables.c @@ -182,7 +182,9 @@ plain_var: if (!index) { zend_hash_next_index_insert(symtable1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p); } else { - zend_symtable_update(symtable1, index, index_len+1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p); + char *escaped_index = php_addslashes(index, index_len, &index_len, 0 TSRMLS_CC); + zend_symtable_update(symtable1, escaped_index, index_len+1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p); + efree(escaped_index); } break; } |