]> granicus.if.org Git - apache/commitdiff
Merge r1797844 from trunk:
authorEric Covener <covener@apache.org>
Tue, 14 Aug 2018 21:03:42 +0000 (21:03 +0000)
committerEric Covener <covener@apache.org>
Tue, 14 Aug 2018 21:03:42 +0000 (21:03 +0000)
allow quoted paths in <IfFile>

The boilerplate code for config sections conflicts with TAKE1
because of the trailing stuff to terminate the opening tag.

Change from TAKE1 to RAW_ARGS and call ap_getword_conf()
directly.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1838053 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
server/core.c

diff --git a/CHANGES b/CHANGES
index b73766272e31e6e1fe8d6b6f290ad9d36e1a0dc8..730279aaa8b571c048652354518a114ce43b5572 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,8 +1,13 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.4.35
 
+  *) Allow the argument to <IfFile>, <IfDefine>, <IfSection>, <IfDirective>, 
+     and <IfModule> to be quoted.  This is primarily for the benefit of
+     <IfFile>. [Eric Covener]
+
   *) mod_md: When the last domain name from an MD is moved to another one,
-     that now empty MD gets moved to the store archive. PR 62572. [Stefan Eissing]
+     that now empty MD gets moved to the store archive. PR 62572. 
+     [Stefan Eissing]
 
   *) mod_ssl: Fix merging of SSLOCSPOverrideResponder.  [Jeff Trawick,
      [Frank Meier <frank meier ergon.ch>]
diff --git a/STATUS b/STATUS
index d5ba87de86966330c5d223255a85743ee1eda1c4..7edefb3ce66618031c201f224e01459e1c8c4d0e 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -131,12 +131,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
      +1: jailletc36, ylavic (by inspection), covener
      jailletc36: untested, but looks straight forward enough to vote
 
-   *) core: allow quoted paths in <IfFile>
-      trunk: http://svn.apache.org/r1797844
-      2.4.x patch: svn merge -c 1797844 ^/httpd/httpd/trunk .
-      +1: jailletc36, covener, jim
-      jailletc36: once backported, iffile.t can be enabled
-
   *) Easy patches: synch 2.4.x and trunk
      - mod_ssl: Tweak logging message
      - mod_ssl: make ssl_io_data_dump respect per-conn loglevel
index 32d19e20adda0e42ef0797455ce15e9f23dc1288..aa62e15267a08efb17f228907b66fd658e184334 100644 (file)
@@ -2721,6 +2721,7 @@ static const char *start_cond_section(cmd_parms *cmd, void *mconfig, const char
     const char *endp = ap_strrchr_c(arg, '>');
     int result, not = (arg[0] == '!');
     test_cond_section_fn testfn = (test_cond_section_fn)cmd->info;
+    const char *arg1;
 
     if (endp == NULL) {
         return unclosed_directive(cmd);
@@ -2732,11 +2733,13 @@ static const char *start_cond_section(cmd_parms *cmd, void *mconfig, const char
         arg++;
     }
 
-    if (!arg[0]) {
+    arg1 = ap_getword_conf(cmd->temp_pool, &arg);
+
+    if (!arg1[0]) {
         return missing_container_arg(cmd);
     }
 
-    result = testfn(cmd, arg);
+    result = testfn(cmd, arg1);
 
     if ((!not && result) || (not && !result)) {
         ap_directive_t *parent = NULL;
@@ -4303,19 +4306,19 @@ AP_INIT_RAW_ARGS("<LimitExcept", ap_limit_section, (void*)1,
                  OR_LIMIT | OR_AUTHCFG,
   "Container for authentication directives to be applied when any HTTP "
   "method other than those specified is used to access the resource"),
-AP_INIT_TAKE1("<IfModule", start_cond_section, (void *)test_ifmod_section,
+AP_INIT_RAW_ARGS("<IfModule", start_cond_section, (void *)test_ifmod_section,
               EXEC_ON_READ | OR_ALL,
   "Container for directives based on existence of specified modules"),
-AP_INIT_TAKE1("<IfDefine", start_cond_section, (void *)test_ifdefine_section,
+AP_INIT_RAW_ARGS("<IfDefine", start_cond_section, (void *)test_ifdefine_section,
               EXEC_ON_READ | OR_ALL,
   "Container for directives based on existence of command line defines"),
-AP_INIT_TAKE1("<IfFile", start_cond_section, (void *)test_iffile_section,
+AP_INIT_RAW_ARGS("<IfFile", start_cond_section, (void *)test_iffile_section,
               EXEC_ON_READ | OR_ALL,
   "Container for directives based on existence of files on disk"),
-AP_INIT_TAKE1("<IfDirective", start_cond_section, (void *)test_ifdirective_section,
+AP_INIT_RAW_ARGS("<IfDirective", start_cond_section, (void *)test_ifdirective_section,
               EXEC_ON_READ | OR_ALL,
   "Container for directives based on existence of named directive"),
-AP_INIT_TAKE1("<IfSection", start_cond_section, (void *)test_ifsection_section,
+AP_INIT_RAW_ARGS("<IfSection", start_cond_section, (void *)test_ifsection_section,
               EXEC_ON_READ | OR_ALL,
   "Container for directives based on existence of named section"),
 AP_INIT_RAW_ARGS("<DirectoryMatch", dirsection, (void*)1, RSRC_CONF,