iliaa Mon Oct 13 23:49:13 2003 EDT Modified files: /php-src/main php_variables.c Log: Fixed bug #25836 (last key of multi-dimensional array passed via GPC not being escaped when magic_quotes_gpc is on). Index: php-src/main/php_variables.c diff -u php-src/main/php_variables.c:1.70 php-src/main/php_variables.c:1.71 --- php-src/main/php_variables.c:1.70 Tue Oct 7 04:46:16 2003 +++ php-src/main/php_variables.c Mon Oct 13 23:49:13 2003 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_variables.c,v 1.70 2003/10/07 08:46:16 stas Exp $ */ +/* $Id: php_variables.c,v 1.71 2003/10/14 03:49:13 iliaa Exp $ */ #include <stdio.h> #include "php.h" @@ -182,7 +182,9 @@ 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; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php