From: Jim Jagielski Date: Wed, 17 Sep 2008 14:31:35 +0000 (+0000) Subject: Merge r693727, r693728 from trunk: X-Git-Tag: 2.2.10~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37b1378cf2545d2e4d867aa3c3728e9b654ab4a5;p=thirdparty%2Fapache%2Fhttpd.git 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 --- diff --git a/STATUS b/STATUS index 331cfc94745..a2fbb5bad54 100644 --- a/STATUS +++ b/STATUS @@ -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: diff --git a/modules/filters/mod_substitute.c b/modules/filters/mod_substitute.c index ebe860d66bf..a50248f323d 100644 --- a/modules/filters/mod_substitute.c +++ b/modules/filters/mod_substitute.c @@ -507,37 +507,43 @@ static const char *set_pattern(cmd_parms *cmd, void *cfg, const char *line) if (delim) from = ++ourline; if (from) { - while (*++ourline && *ourline != delim); + if (*ourline != delim) { + while (*++ourline && *ourline != delim); + } if (*ourline) { *ourline = '\0'; to = ++ourline; } } if (to) { - while (*++ourline && *ourline != delim); + 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"; } - while (*flags) { - delim = apr_tolower(*flags); /* re-use */ - if (delim == 'i') - ignore_case = 1; - else if (delim == 'n') - is_pattern = 1; - else if (delim == 'f') - flatten = 1; - else if (delim == 'q') - flatten = 0; - else - return "Bad Substitute flag, only s///[infq] are supported"; - flags++; + if (flags) { + while (*flags) { + delim = apr_tolower(*flags); /* re-use */ + if (delim == 'i') + ignore_case = 1; + else if (delim == 'n') + is_pattern = 1; + else if (delim == 'f') + flatten = 1; + else if (delim == 'q') + flatten = 0; + else + return "Bad Substitute flag, only s///[infq] are supported"; + flags++; + } } /* first see if we can compile the regex */