Commit 3f4766c9 authored by Joe Orton's avatar Joe Orton
Browse files

* modules/proxy/mod_proxy_balancer.c (make_server_id):

  Fix APR 1.4 compatibility by avoiding use of apr_escape.h.

Submitted by: jorton
Reviewed by: jorton, rpluem, ylavic


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1836471 13f79535-47bb-0310-9956-ffa450edef68
parent f50d53e5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
                                                         -*- coding: utf-8 -*-
Changes with Apache 2.4.35

  *) mod_proxy_balancer: Restore compatibility with APR 1.4.  [Joe Orton]

Changes with Apache 2.4.34

  *) SECURITY: CVE-2018-8011 (cve.mitre.org)
+4 −2
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@
#include "apr_version.h"
#include "ap_hooks.h"
#include "apr_date.h"
#include "apr_escape.h"
#include "util_md5.h"
#include "mod_watchdog.h"

static const char *balancer_mutex_type = "proxy-balancer-shm";
@@ -740,6 +740,7 @@ static apr_status_t lock_remove(void *data)
{
    apr_md5_ctx_t md5_ctx;
    unsigned char md5[APR_MD5_DIGESTSIZE];
    char id[2 * APR_MD5_DIGESTSIZE + 1];
    char host_ip[64]; /* for any IPv[46] string */
    server_addr_rec *sar;
    int i;
@@ -775,8 +776,9 @@ static apr_status_t lock_remove(void *data)
        }
    }
    apr_md5_final(md5, &md5_ctx);
    ap_bin2hex(md5, APR_MD5_DIGESTSIZE, id);

    return apr_pescape_hex(p, md5, sizeof md5, 0);
    return apr_pstrmemdup(p, id, sizeof(id) - 1);
}

/*