diff options
| author | Rasmus Lerdorf <rasmus@php.net> | 2006-05-10 21:19:32 +0000 | 
|---|---|---|
| committer | Rasmus Lerdorf <rasmus@php.net> | 2006-05-10 21:19:32 +0000 | 
| commit | 4df7ab403c3cb168047ce5bb14fbaf19e078b1fa (patch) | |
| tree | 4943c3378bd29f9ac2a5eb5225394d91279d1428 /sapi/apache/mod_php5.c | |
| parent | d76c516176ac65b45f2a424c2525c2d978e120ec (diff) | |
| download | php-git-4df7ab403c3cb168047ce5bb14fbaf19e078b1fa.tar.gz | |
Add input_filter hook call in getenv()
Diffstat (limited to 'sapi/apache/mod_php5.c')
| -rw-r--r-- | sapi/apache/mod_php5.c | 6 | 
1 files changed, 5 insertions, 1 deletions
diff --git a/sapi/apache/mod_php5.c b/sapi/apache/mod_php5.c index be82e13369..04f9da4d86 100644 --- a/sapi/apache/mod_php5.c +++ b/sapi/apache/mod_php5.c @@ -254,13 +254,17 @@ static void sapi_apache_register_server_variables(zval *track_vars_array TSRMLS_  	for (i = 0; i < arr->nelts; i++) {  		char *val; +		int val_len, new_val_len;  		if (elts[i].val) {  			val = elts[i].val;  		} else {  			val = "";  		} -		php_register_variable(elts[i].key, val, track_vars_array  TSRMLS_CC); +		val_len = strlen(val); +		if (sapi_module.input_filter(PARSE_SERVER, elts[i].key, &val, val_len, &new_val_len TSRMLS_CC)) { +			php_register_variable_safe(elts[i].key, val, new_val_len, track_vars_array TSRMLS_CC); +		}  	}  	/* If PATH_TRANSLATED doesn't exist, copy it from SCRIPT_FILENAME */  | 
