https://issues.apache.org/bugzilla/show_bug.cgi?id=52823
Bug #: 52823
Summary: Incorrect semantics of AllowOverrideList in
Apache-2.4.1
Product: Apache httpd-2
Version: 2.4.1
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Core
AssignedTo: [email protected]
ReportedBy: [email protected]
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");
else
ap_log_error(APLOG_MARK, APLOG_WARNING, 0,
cmd->server, APLOGNO(00116)
"Discarding unrecognized directive `%s' in AllowOverrideList.",
argv[i]);
}
}
}
>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: 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: [email protected]
For additional commands, e-mail: [email protected]