From: Rasmus Lerdorf Date: Mon, 19 Aug 2002 15:52:21 +0000 (+0000) Subject: Fix xbithack bug finally (see bug #16515) X-Git-Tag: RELEASE_0_91~395 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f5630aa2460beab1daac2afb71d36279b9084c14;p=php Fix xbithack bug finally (see bug #16515) --- diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c index 2d81b78935..c6a3443ebc 100644 --- a/sapi/apache/mod_php4.c +++ b/sapi/apache/mod_php4.c @@ -758,13 +758,17 @@ CONST_PREFIX char *php_apache_admin_flag_handler(cmd_parms *cmd, HashTable *conf int php_xbithack_handler(request_rec * r) { php_apache_info_struct *conf; + HashTable *per_dir_conf; - conf = (php_apache_info_struct *) get_module_config(r->per_dir_config, &php4_module); if (!(r->finfo.st_mode & S_IXUSR)) { r->allowed |= (1 << METHODS) - 1; return DECLINED; } - if (conf->xbithack == 0) { + per_dir_conf = (HashTable *) get_module_config(r->per_dir_config, &php4_module); + if (per_dir_conf) { + zend_hash_apply((HashTable *) per_dir_conf, (apply_func_t) php_apache_alter_ini_entries TSRMLS_CC); + } + if(!AP(xbithack)) { r->allowed |= (1 << METHODS) - 1; return DECLINED; }