From: Stefan Fritsch Date: Mon, 19 Mar 2012 20:57:19 +0000 (+0000) Subject: In AllowOverrideList, do not allow 'None' together with other directives. X-Git-Tag: 2.5.0-alpha~7336 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c9fa20fb1082f6a0397a099ce9f1335dbecd7719;p=apache In AllowOverrideList, do not allow 'None' together with other directives. While there, improve log messages and save some memory by allocating correct size for table. PR 52823 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1302653 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 9c60ba3542..829a2be4ae 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) core: In AllowOverrideList, do not allow 'None' together with other + directives. PR 52823. [Stefan Fritsch] + *) mod_proxy: Correctly set up reverse proxy worker. PR 52935. [Petter Berntsen ] diff --git a/server/core.c b/server/core.c index d28b14b2ce..374a1f64eb 100644 --- a/server/core.c +++ b/server/core.c @@ -1661,16 +1661,20 @@ static const char *set_override_list(cmd_parms *cmd, void *d_, int argc, char *c /* Throw a warning if we're in or */ if (ap_check_cmd_context(cmd, NOT_IN_LOCATION | NOT_IN_FILES)) { ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, APLOGNO(00115) - "Useless use of AllowOverrideList in line %d of %s.", - cmd->directive->line_num, cmd->directive->filename); + "Useless use of AllowOverrideList at %s:%d", + cmd->directive->filename, cmd->directive->line_num); } if ((err = ap_check_cmd_context(cmd, NOT_IN_HTACCESS)) != NULL) return err; - d->override_list = apr_table_make(cmd->pool, 1); + d->override_list = apr_table_make(cmd->pool, argc); for (i=0;ioverride_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]); + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, + APLOGNO(00116) "Discarding unrecognized " + "directive `%s' in AllowOverrideList at %s:%d", + argv[i], cmd->directive->filename, + cmd->directive->line_num); } }