Commit 7c54df92 authored by Jim Jagielski's avatar Jim Jagielski
Browse files

Merge r1695170 from trunk:

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
parent e985265d
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -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 ]
+7 −0
Original line number Diff line number Diff line
@@ -1339,6 +1339,13 @@ static char *lookup_map_dbd(request_rec *r, char *key, const char *label)
    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);

    rv = apr_dbd_pvselect(db->driver, r->pool, db->handle, &res,