From: Daniel Earl Poirier Date: Mon, 14 Sep 2009 16:32:30 +0000 (+0000) Subject: mod_mime: detect invalid use of MultiviewsMatch inside Location and X-Git-Tag: 2.3.3~307 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=264e4a0cfceeb4cc7ab1cdf0fbc4d9ee0dd50762;p=apache mod_mime: detect invalid use of MultiviewsMatch inside Location and LocationMatch sections. Document that such usage is not valid. PR47754. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@814728 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index e5dd676668..3762ea7d13 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,9 @@ Changes with Apache 2.3.3 + *) mod_mime: Detect invalid use of MultiviewsMatch inside Location and + LocationMatch sections. PR47754. [Dan Poirier] + *) mod_request: Make sure the KeptBodySize directive rejects values that aren't valid numbers. [Graham Leggett] diff --git a/docs/manual/mod/mod_mime.xml b/docs/manual/mod/mod_mime.xml index 292f38af01..fd4f21812d 100644 --- a/docs/manual/mod/mod_mime.xml +++ b/docs/manual/mod/mod_mime.xml @@ -608,6 +608,11 @@ a matching file with MultiViews MultiviewsMatch Handlers Filters + +

MultiviewsMatch is not allowed in a + Location or LocationMatch section.

+ Options mod_negotiation diff --git a/modules/http/mod_mime.c b/modules/http/mod_mime.c index 818b7d4a56..95709766eb 100644 --- a/modules/http/mod_mime.c +++ b/modules/http/mod_mime.c @@ -312,6 +312,12 @@ static const char *multiviews_match(cmd_parms *cmd, void *m_, const char *include) { mime_dir_config *m = (mime_dir_config *) m_; + const char *errmsg; + + errmsg = ap_check_cmd_context(cmd, NOT_IN_LOCATION); + if (errmsg != NULL) { + return errmsg; + } if (strcasecmp(include, "Any") == 0) { if (m->multimatch && (m->multimatch & ~MULTIMATCH_ANY)) {