From ea2fb43f325b303265cb1bbca09a90ddaa0668c1 Mon Sep 17 00:00:00 2001 From: Graham Leggett Date: Sun, 25 Mar 2012 21:04:11 +0000 Subject: [PATCH] Backport: core: In AllowOverrideList, do not allow 'None' together with other directives. PR 52823. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1305132 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ STATUS | 6 ------ server/core.c | 18 ++++++++++++------ 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/CHANGES b/CHANGES index c2afb292a6..0a9500d4a4 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,9 @@ Changes with Apache 2.4.2 envvars: Fix insecure handling of LD_LIBRARY_PATH that could lead to the current working directory to be searched for DSOs. [Stefan Fritsch] + *) core: In AllowOverrideList, do not allow 'None' together with other + directives. PR 52823. [Stefan Fritsch] + *) mod_slotmem_shm: Support DEFAULT_REL_RUNTIMEDIR for file-based shm. [Jim Jagielski] diff --git a/STATUS b/STATUS index efb0817ed6..b61f05f6a2 100644 --- a/STATUS +++ b/STATUS @@ -88,12 +88,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * core: In AllowOverrideList, do not allow 'None' together with other directives. - PR 52823 - Trunk patch: http://svn.apache.org/viewvc?rev=1302653&view=rev - 2.4.x patch: Trunk patch works - +1: sf, covener, druggeri - * core: In AllowOverrideList, disallow directives which are only allowed in VirtualHost or server context. Trunk patch: http://svn.apache.org/viewvc?rev=1302665&view=rev diff --git a/server/core.c b/server/core.c index 1e4c7856c1..482acecb5a 100644 --- a/server/core.c +++ b/server/core.c @@ -1659,16 +1659,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); } } -- 2.50.1