diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2006-11-03 13:51:48 +0000 |
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2006-11-03 13:51:48 +0000 |
| commit | 6123f110210808aa2557d93e5de32cfbc32ec419 (patch) | |
| tree | 22b3658bbd2e8e44c37c41d0e1b9a71c9d2184be /sapi/apache | |
| parent | bd2ab7bc1557153242f3efbfdeab1721b20ac614 (diff) | |
| download | php-git-6123f110210808aa2557d93e5de32cfbc32ec419.tar.gz | |
MFH:
Added filter support for $_SERVER in cgi/apache2 sapis
Make sure PHP_SELF is filtered in Apache 1 sapi
Diffstat (limited to 'sapi/apache')
| -rw-r--r-- | sapi/apache/mod_php5.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sapi/apache/mod_php5.c b/sapi/apache/mod_php5.c index 719a193232..101c449240 100644 --- a/sapi/apache/mod_php5.c +++ b/sapi/apache/mod_php5.c @@ -246,10 +246,11 @@ static void sapi_apache_register_server_variables(zval *track_vars_array TSRMLS_ table_entry *elts = (table_entry *) arr->elts; zval **path_translated; HashTable *symbol_table; + int new_val_len; for (i = 0; i < arr->nelts; i++) { char *val; - int val_len, new_val_len; + int val_len; if (elts[i].val) { val = elts[i].val; @@ -277,7 +278,9 @@ static void sapi_apache_register_server_variables(zval *track_vars_array TSRMLS_ php_register_variable("PATH_TRANSLATED", Z_STRVAL_PP(path_translated), track_vars_array TSRMLS_CC); } - php_register_variable("PHP_SELF", ((request_rec *) SG(server_context))->uri, track_vars_array TSRMLS_CC); + if (sapi_module.input_filter(PARSE_SERVER, "PHP_SELF", &((request_rec *) SG(server_context))->uri, strlen(((request_rec *) SG(server_context))->uri), &new_val_len TSRMLS_CC)) { + php_register_variable("PHP_SELF", ((request_rec *) SG(server_context))->uri, track_vars_array TSRMLS_CC); + } } /* }}} */ |
