]> granicus.if.org Git - php/commitdiff
fix #39763 (magic quotes are applied twice by ext/filter)
authorAntony Dovgal <tony2001@php.net>
Thu, 7 Dec 2006 10:59:35 +0000 (10:59 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 7 Dec 2006 10:59:35 +0000 (10:59 +0000)
no need to add slashes manually, they are added by php_register_variable_ex()

ext/filter/filter.c

index 42c058f43ba9c30bc974dc0d3d95603f2c87f2df..2b49535b27f8ba24b448a4fecef0946c0083b1ff 100644 (file)
@@ -397,13 +397,7 @@ static unsigned int php_sapi_filter(int arg, char *var, char **val, unsigned int
                        Z_STRVAL(new_var) = estrndup(*val, val_len);
                        INIT_PZVAL(tmp_new_var);
                        php_zval_filter(&tmp_new_var, IF_G(default_filter), IF_G(default_filter_flags), NULL, NULL/*charset*/, 0 TSRMLS_CC);
-               }
-#if PHP_VERSION_ID<60000
-               else if (PG(magic_quotes_gpc)) {
-                       Z_STRVAL(new_var) = php_addslashes(*val, Z_STRLEN(new_var), &Z_STRLEN(new_var), 0 TSRMLS_CC);
-               }
-#endif
-               else {
+               } else {
                        Z_STRVAL(new_var) = estrndup(*val, val_len);
                }
        } else { /* empty string */