httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 52845] New: "DirectoryIndex disabled" cannot disable index files.
Date Wed, 07 Mar 2012 08:31:17 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=52845

             Bug #: 52845
           Summary: "DirectoryIndex disabled" cannot disable index files.
           Product: Apache httpd-2
           Version: 2.4.1
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_dir
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: tixu@cs.ucsd.edu
    Classification: Unclassified


In the configuration file, e.g., httpd.conf, if you have:

DirectoryIndex index.html index.txt
DirectoryIndex disabled

Then, all the previous index files (index.html, index.txt in this case) are not
disabled. This violates the semantics of the DirectoryIndex directive.

If the two DirectoryIndex directives are seperated in a large httpd.conf (e.g.,
a lot of other directives are in between), this will bring confusion to users.

Looking at the code in modules/mappers/mod_dir.c (see below), you can find that
the previous list is not cleared when an alone "disabled" is encountered.


    while ((w = ap_getword_conf(cmd->pool, &t)) && w[0]) {
        if (count == 0 && !strcasecmp(w, "disabled")) {
            /* peek to see if "disabled" is first in a series of arguments */
            const char *tt = t;
            const char *ww = ap_getword_conf(cmd->temp_pool, &tt);
            if (ww == NULL || !ww[0]) {
               /* "disabled" is first, and alone */
               break;
            }
        }
        *(const char **)apr_array_push(d->index_names) = w;
        count++;
    }

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message