]> granicus.if.org Git - php/commitdiff
Fix xbithack bug finally (see bug #16515)
authorRasmus Lerdorf <rasmus@php.net>
Mon, 19 Aug 2002 15:52:21 +0000 (15:52 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Mon, 19 Aug 2002 15:52:21 +0000 (15:52 +0000)
sapi/apache/mod_php4.c

index 2d81b78935f941490bb83a67ca0c6d8988a4c897..c6a3443ebc927b17b0e46cb74e191c96132ec58e 100644 (file)
@@ -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;
        }