Commit c6901b42 authored by Jim Jagielski's avatar Jim Jagielski
Browse files

Merge r693727, r693728 from trunk:

* Allow empty substitute patterns (to remove data from the stream), but
  disallow empty search patterns.


* Fix potential segfault if flags remains NULL.

Submitted by: rpluem
Reviewed by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@696321 13f79535-47bb-0310-9956-ffa450edef68
parent 49ad0be8
Loading
Loading
Loading
Loading
+0 −30
Changes for STATUS: 0 added lines, 30 removed lines.
Original line number Diff line number Diff line
@@ -92,27 +92,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   http://svn.apache.org/viewvc?rev=639010&view=rev (mmn)
   +1: niq, rpluem, mturk

 * mod_proxy: Add the possibility to set a separate connection timeout for
   backend workers.
   PR: 45445
    Trunk version of patch:
       http://svn.apache.org/viewvc?rev=684341&view=rev
    Backport version for 2.2.x of patch:
       Trunk version of patch works, but 
       http://people.apache.org/~rpluem/patches/37770_2.2.x.diff
       fixes a conflict regarding the needed minor bump.
    +1: rpluem, jim, jerenkrantz

 * mod_proxy_balancer: Allow for treatment of ';' char as a session
   deliminator/separator, ala mod_jk.
   PR: 45158
    Trunk version of patch:
       http://svn.apache.org/viewvc?rev=686809&view=rev
       http://svn.apache.org/viewvc?rev=687754&view=rev
    Backport version for 2.2.x of patch:
       http://people.apache.org/~jim/patches/scolon-proxy.patch.txt
    +1: jim, rpluem, jerenkrantz

 * mod_authn_alias: Propogate a NULL get_realm_hash() implementation 
   from AuthnProviderAlias back to mod_auth_digest. This moves detection
   of an incompatible-with-digest provider to a startup error.
@@ -123,15 +102,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
       http://people.apache.org/~covener/2.2.x-auth_alias_digest.diff 
   +1: covener, rpluem, jerenkrantz

 * mod_substitute: Allow empty substitute patterns (to remove data from the
   stream), but disallow empty search patterns.
   Trunk version of patches:
      http://svn.apache.org/viewvc?rev=693727&view=rev
      http://svn.apache.org/viewvc?rev=693728&view=rev
   Backport version for 2.2.x of patch:
       Trunk version of patches works
   +1: rpluem, covener, jerenkrantz

 * mod_proxy_ajp: If CPING fails retry once more with a fresh TCP connection.
   If this fails as well give up.
   Trunk version of patches:
+7 −1
Changes for modules/filters/mod_substitute.c: 7 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -507,24 +507,29 @@ static const char *set_pattern(cmd_parms *cmd, void *cfg, const char *line)
    if (delim)
        from = ++ourline;
    if (from) {
        if (*ourline != delim) {
            while (*++ourline && *ourline != delim);
        }
        if (*ourline) {
            *ourline = '\0';
            to = ++ourline;
        }
    }
    if (to) {
        if (*ourline != delim) {
            while (*++ourline && *ourline != delim);
        }
        if (*ourline) {
            *ourline = '\0';
            flags = ++ourline;
        }
    }

    if (!delim || !from || !to) {
    if (!delim || !from || !*from || !to) {
        return "Bad Substitute format, must be a complete s/// pattern";
    }

    if (flags) {
        while (*flags) {
            delim = apr_tolower(*flags);    /* re-use */
            if (delim == 'i')
@@ -539,6 +544,7 @@ static const char *set_pattern(cmd_parms *cmd, void *cfg, const char *line)
                return "Bad Substitute flag, only s///[infq] are supported";
            flags++;
        }
    }

    /* first see if we can compile the regex */
    if (!is_pattern) {