From 0d4caaa46c480b957bad2aad28d9abacf69e22c0 Mon Sep 17 00:00:00 2001 From: Graham Leggett Date: Fri, 16 Feb 2018 12:35:03 +0000 Subject: [PATCH] proxy_util: Schemes and hostnames that are "too long" are no longer automatically fatal errors but are instead logged and truncated, at which point the admin can determine if that is OK or not. trunk patch: http://svn.apache.org/r1823482 +1: jim, minfrin, rpluem git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1824455 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 4 ++++ STATUS | 8 -------- modules/proxy/proxy_util.c | 6 ++++-- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/CHANGES b/CHANGES index 03b2456423..d20a3472b2 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,10 @@ -*- coding: utf-8 -*- Changes with Apache 2.4.30 + *) mod_proxy: Worker schemes and hostnames which are too large are no + longer fatal errors; it is logged and the truncated values are stored. + [Jim Jagielski] + *) mod_proxy: Allow setting options to globally defined balancer from ProxyPass used in VirtualHost. Balancers are now merged using the new merge_balancers method which merges the balancers options. [Jan Kaluza] diff --git a/STATUS b/STATUS index ac73247813..fdd0def06e 100644 --- a/STATUS +++ b/STATUS @@ -118,14 +118,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - *) proxy_util: Schemes and hostnames that are "too long" are - no longer automatically fatal errors but are instead logged - and truncated, at which point the admin can determine if that - is OK or not. - trunk patch: http://svn.apache.org/r1823482 - 2.4.x patch: trunk works - +1: jim, minfrin, rpluem - *) mod_authnz_ldap: Fix language long names detection as short name. trunk patch: http://svn.apache.org/r1824336 2.4.x patch: trunk works (modulo CHANGES) diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 7b4cb09e08..11cbe9187a 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -1691,10 +1691,12 @@ PROXY_DECLARE(char *) ap_proxy_define_worker(apr_pool_t *p, "Alert! worker name (%s) too long; truncated to: %s", ptr, wshared->name); } if (PROXY_STRNCPY(wshared->scheme, uri.scheme) != APR_SUCCESS) { - return apr_psprintf(p, "worker scheme (%s) too long", uri.scheme); + ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, APLOGNO(010117) + "Alert! worker scheme (%s) too long; truncated to: %s", uri.scheme, wshared->scheme); } if (PROXY_STRNCPY(wshared->hostname, uri.hostname) != APR_SUCCESS) { - return apr_psprintf(p, "worker hostname (%s) too long", uri.hostname); + ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, APLOGNO(010118) + "Alert! worker hostname (%s) too long; truncated to: %s", uri.hostname, wshared->hostname); } wshared->flush_packets = flush_off; wshared->flush_wait = PROXY_FLUSH_WAIT; -- 2.40.0