From: Joe Orton Date: Mon, 23 Jul 2018 08:47:59 +0000 (+0000) Subject: * modules/proxy/mod_proxy_balancer.c (make_server_id): X-Git-Tag: 2.4.35~127 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=35b5d45859092d9e03921abc057e833a7c9bf8af;p=thirdparty%2Fapache%2Fhttpd.git * 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 --- diff --git a/CHANGES b/CHANGES index 66f49cc622f..35a1469d11f 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ -*- 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) diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c index e0ccc318714..c3c5d83960f 100644 --- a/modules/proxy/mod_proxy_balancer.c +++ b/modules/proxy/mod_proxy_balancer.c @@ -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); } /*