@@ -63,7 +63,6 @@ frankenphp_config frankenphp_get_config() {
6363 };
6464}
6565
66- bool should_filter_var = 0 ;
6766__thread uintptr_t thread_index ;
6867__thread bool is_worker_thread = false;
6968__thread zval * os_environment = NULL ;
@@ -613,10 +612,8 @@ void frankenphp_register_trusted_var(zend_string *z_key, char *value,
613612 }
614613 size_t new_val_len = val_len ;
615614
616- if ((should_filter_var &&
617- sapi_module .input_filter (PARSE_SERVER , ZSTR_VAL (z_key ), & value ,
618- new_val_len , & new_val_len )) ||
619- !should_filter_var ) {
615+ if (sapi_module .input_filter (PARSE_SERVER , ZSTR_VAL (z_key ), & value ,
616+ new_val_len , & new_val_len )) {
620617 zval z_value ;
621618 ZVAL_STRINGL_FAST (& z_value , value , new_val_len );
622619 zend_hash_update_ind (ht , z_key , & z_value );
@@ -744,10 +741,8 @@ void frankenphp_register_variable_safe(char *key, char *val, size_t val_len,
744741 val = "" ;
745742 }
746743 size_t new_val_len = val_len ;
747- if ((should_filter_var &&
748- sapi_module .input_filter (PARSE_SERVER , key , & val , new_val_len ,
749- & new_val_len )) ||
750- !should_filter_var ) {
744+ if (sapi_module .input_filter (PARSE_SERVER , key , & val , new_val_len ,
745+ & new_val_len )) {
751746 php_register_variable_safe (key , val , new_val_len , track_vars_array );
752747 }
753748}
@@ -918,12 +913,6 @@ static void *php_main(void *arg) {
918913
919914 frankenphp_sapi_module .startup (& frankenphp_sapi_module );
920915
921- /* check if a default filter is set in php.ini and only filter if
922- * it is, this is deprecated and will be removed in PHP 9 */
923- char * default_filter ;
924- cfg_get_string ("filter.default" , & default_filter );
925- should_filter_var = default_filter != NULL ;
926-
927916 go_frankenphp_main_thread_is_ready ();
928917
929918 /* channel closed, shutdown gracefully */
0 commit comments