httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 52823] New: Incorrect semantics of AllowOverrideList in Apache-2.4.1
Date Sun, 04 Mar 2012 18:09:05 GMT

             Bug #: 52823
           Summary: Incorrect semantics of AllowOverrideList in
           Product: Apache httpd-2
           Version: 2.4.1
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
    Classification: Unclassified

It seems that AllowOverride is a new feature of Apache-2.4.1. But it seems to
have quite a few problems. When looking at source code, the parsing logic is as
follows (server/core.c):

//argc is the number of arguments
//argv[] is the argument array, each element argv[i] is a cmd name

for (i=0;i<argc;i++){
    if (!strcasecmp(argv[i], "None")) {
        return NULL;
    else {
        const command_rec *result = NULL;
        module *mod = ap_top_module;
        result = ap_find_command_in_modules(argv[i], &mod);
        if (result)
            apr_table_set(d->override_list, argv[i], "1");
            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, 
                cmd->server, APLOGNO(00116)
                "Discarding unrecognized directive `%s' in AllowOverrideList.",

>From the code, we can see that the parsing returns as long as a "None" is
detected. As a result, the following two configuration entries have very
different effects:

AllowOverrideList DirectoryIndex Redirect None
AllowOverrideList None DirectoryIndex Redirect

The former sets two directives to be allowed in .htaccess while the latter sets
nothing, which causes ambiguity.

Actually the logic of "AllowOverrideList DirectoryIndex Redirect None" itself
is very ambiguous. "None" and the other directives are obviously contradictory.

I suggest to print out some log messages to explicitly tell users the
contradictory and which particular setting is omitted. This can avoid user's
misconfigurations and bring clear semantics of AllowOverrideList.

Thanks a lot!

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message