]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1695170 from trunk:
authorJim Jagielski <jim@apache.org>
Sat, 5 Sep 2015 16:58:48 +0000 (16:58 +0000)
committerJim Jagielski <jim@apache.org>
Sat, 5 Sep 2015 16:58:48 +0000 (16:58 +0000)
Avoid a crash when lacking correct DB access permissions. PR 57868.
Submitted by: jailletc36
Reviewed/backported by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1701405 13f79535-47bb-0310-9956-ffa450edef68

STATUS
modules/mappers/mod_rewrite.c

diff --git a/STATUS b/STATUS
index d88b5685acef9c9f1e75679a7b061b53c6eb0a2c..f4bbe2d0e8e96f10bacc2b1bf1974fe555ef4226 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -109,13 +109,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  *) mod_rewrite: Avoid a crash when lacking correct DB access permissions
-     when using RewriteMap with MapType dbd or fastdbd.
-     PR 57868.
-     trunk: http://svn.apache.org/r1695170
-     2.4.x: trunk works modulo (missing) CHANGES and next-number
-     +1: jailletc36, ylavic, niq
-     jailletc36: A CHANGE entry should be added. I forgot it :(
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
index f1ed708bff325de91be9323bf82d0c03e2d4b028..90cff5c583fdd57022b654164203b0b6c614a113 100644 (file)
@@ -1338,6 +1338,13 @@ static char *lookup_map_dbd(request_rec *r, char *key, const char *label)
     char *ret = NULL;
     int n = 0;
     ap_dbd_t *db = dbd_acquire(r);
+    
+    if (db == NULL) {
+        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02963)
+                      "rewritemap: No db handle available! "
+                      "Check your database access");
+        return NULL;
+   }
 
     stmt = apr_hash_get(db->prepared, label, APR_HASH_KEY_STRING);