Commit 553073c7 authored by Jim Jagielski's avatar Jim Jagielski
Browse files

Merge r1742135 from trunk:

We need another guard, this may resolve a crash in the rather odd faux-server
implementation in mod_perl test suite which calls access checking too early.


Submitted by: wrowe
Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1743575 13f79535-47bb-0310-9956-ffa450edef68
parent 9fcf7cd9
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -124,12 +124,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
     updated patch with APLOGNOs by merging 1735931,1735935 from trunk
     updated patch with APLOGNOs by merging 1735942 from trunk

   * Guard against premature invocation of ap_get_useragent_host()
     when the read_request hook has not satisfied r->useragent_addr;
     trunk patch: http://svn.apache.org/r1742135
     2.4.x patch: trunk works
     +1: wrowe, rpluem, jim


PATCHES PROPOSED TO BACKPORT FROM TRUNK:
  [ New proposals should be added at the end of the list ]
+4 −1
Original line number Diff line number Diff line
@@ -975,7 +975,10 @@ AP_DECLARE(const char *) ap_get_useragent_host(request_rec *r,
    int hostname_lookups;
    int ignored_str_is_ip;

    if (r->useragent_addr == conn->client_addr) {
    /* Guard here when examining the host before the read_request hook
     * has populated an r->useragent_addr
     */
    if (!r->useragent_addr || (r->useragent_addr == conn->client_addr)) {
        return ap_get_remote_host(conn, r->per_dir_config, type, str_is_ip);
    }