diff options
author | Eric Covener <covener@apache.org> | 2011-08-08 04:29:39 +0200 |
---|---|---|
committer | Eric Covener <covener@apache.org> | 2011-08-08 04:29:39 +0200 |
commit | e74e7f63226d98fe854488aa8a0b923467684f7f (patch) | |
tree | 8617c7266516037a1e82b83f53722a58e62e5ca6 /modules/mappers | |
parent | Typo fix (thanks to Tom Browder on users@) (diff) | |
download | apache2-e74e7f63226d98fe854488aa8a0b923467684f7f.tar.xz apache2-e74e7f63226d98fe854488aa8a0b923467684f7f.zip |
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
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1154808 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/mappers')
-rw-r--r-- | modules/mappers/mod_rewrite.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index 87855dd7ae..0f6b61f250 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -3043,7 +3043,7 @@ static const char *cmd_rewritemap(cmd_parms *cmd, void *dconf, const char *a1, 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); } @@ -3064,7 +3064,7 @@ static const char *cmd_rewritemap(cmd_parms *cmd, void *dconf, const char *a1, 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, |