You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@apache.org on 2011/09/04 00:54:26 UTC
svn commit: r1164941 - in /httpd/httpd/branches/2.2.x: CHANGES
modules/mappers/mod_rewrite.c
Author: covener
Date: Sat Sep 3 22:54:25 2011
New Revision: 1164941
URL: http://svn.apache.org/viewvc?rev=1164941&view=rev
Log:
backport r1154808 from trunk:
Prevent a crash if a non-existent internal RewriteMap is specified
in a server context with RewiteEngine off, then later referenced.
Submitted By: Ben Noordhuis
Reviewed By: covener, sf, trawick
Modified:
httpd/httpd/branches/2.2.x/CHANGES
httpd/httpd/branches/2.2.x/modules/mappers/mod_rewrite.c
Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=1164941&r1=1164940&r2=1164941&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Sat Sep 3 22:54:25 2011
@@ -1,6 +1,11 @@
-*- coding: utf-8 -*-
Changes with Apache 2.2.21
+ *) mod_rewrite: Check validity of each internal (int:) RewriteMap even if the
+ RewriteEngine is disabled in server context, avoiding a crash while
+ referencing the invalid int: map at runtime. PR 50994.
+ [Ben Noordhuis <info noordhuis nl>]
+
*) core: Add MaxRanges directive to control the number of ranges permitted
before returning the entire resource, with a default limit of 200.
[Eric Covener]
Modified: httpd/httpd/branches/2.2.x/modules/mappers/mod_rewrite.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/mappers/mod_rewrite.c?rev=1164941&r1=1164940&r2=1164941&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/mappers/mod_rewrite.c (original)
+++ httpd/httpd/branches/2.2.x/modules/mappers/mod_rewrite.c Sat Sep 3 22:54:25 2011
@@ -2978,7 +2978,7 @@ static const char *cmd_rewritemap(cmd_pa
newmap->cachename = NULL;
newmap->func = (char *(*)(request_rec *,char *))
apr_hash_get(mapfunc_hash, a2+4, strlen(a2+4));
- if ((sconf->state == ENGINE_ENABLED) && (newmap->func == NULL)) {
+ if (newmap->func == NULL) {
return apr_pstrcat(cmd->pool, "RewriteMap: internal map not found:",
a2+4, NULL);
}
@@ -2999,7 +2999,7 @@ static const char *cmd_rewritemap(cmd_pa
newmap->fpin = NULL;
newmap->fpout = NULL;
- if (newmap->checkfile && (sconf->state == ENGINE_ENABLED)
+ if (newmap->checkfile
&& (apr_stat(&st, newmap->checkfile, APR_FINFO_MIN,
cmd->pool) != APR_SUCCESS)) {
return apr_pstrcat(cmd->pool,