Commit 17a901d8 authored by Jim Jagielski's avatar Jim Jagielski
Browse files

Merge r1773397 from trunk:

ProxyPass ! doesn't block per-directory ProxyPass

 *) mod_proxy: Honor a server scoped ProxyPass exception when ProxyPass is
     configured in <Location>, like in 2.2. PR 60458.
     [Eric Covener]


Submitted by: covener
Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1773800 13f79535-47bb-0310-9956-ffa450edef68
parent 517670b1
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -22,6 +22,10 @@ Changes with Apache 2.4.24
     MAC (SipHash) to prevent deciphering or tampering with a padding
     oracle attack.  [Yann Ylavic, Colm MacCarthaigh]

 *) mod_proxy: Honor a server scoped ProxyPass exception when ProxyPass is
     configured in <Location>, like in 2.2. PR 60458.
     [Eric Covener]

  *) mod_lua: Fix default value of LuaInherit directive. It should be 
     'parent-first' instead of 'none', as per documentation.  PR 60419
     [Christophe Jaillet]
+0 −5
Original line number Diff line number Diff line
@@ -117,11 +117,6 @@ RELEASE SHOWSTOPPERS:
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
  [ start all new proposals below, under PATCHES PROPOSED. ]

  *) ProxyPass ! in server scope doesn't block per-location ProxyPass. Worked in 2.2
     Trunk patch: https://svn.apache.org/r1773397
     2.4.x patch: trunk works
     +1 covener, jim, ylavic

  *) Propose we apr_pstrdup constant r->protocol assignments, and always fail
     entirely invalid protocols (expecting these are part two of a URL with
     embedded raw SP characters), without considering 'strict'-ness.
+15 −4
Original line number Diff line number Diff line
@@ -771,18 +771,29 @@ static int proxy_trans(request_rec *r)
     */

    dconf = ap_get_module_config(r->per_dir_config, &proxy_module);

    conf = (proxy_server_conf *) ap_get_module_config(r->server->module_config,
                                                      &proxy_module);
    /* short way - this location is reverse proxied? */
    if (dconf->alias) {
        int rv = ap_proxy_trans_match(r, dconf->alias, dconf);
        if (OK == rv) { 
            /* Got a hit. Need to make sure it's not explicitly declined */
            if (conf->aliases->nelts) {
                ent = (struct proxy_alias *) conf->aliases->elts;
                for (i = 0; i < conf->aliases->nelts; i++) {
                    int rv = ap_proxy_trans_match(r, &ent[i], dconf);
                    if (DECLINED == rv) { 
                        return DECLINED;
                    }
                }
            }
            return OK; 
        }
        if (DONE != rv) {
            return rv;
        }
    }

    conf = (proxy_server_conf *) ap_get_module_config(r->server->module_config,
                                                      &proxy_module);

    /* long way - walk the list of aliases, find a match */
    if (conf->aliases->nelts) {
        ent = (struct proxy_alias *) conf->aliases->elts;