From: Jeff Trawick Date: Tue, 29 Mar 2005 08:44:31 +0000 (+0000) Subject: backport this from 2.1-dev: X-Git-Tag: 2.0.54~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0ec930a653921d9c201584829b14703154e5f16e;p=thirdparty%2Fapache%2Fhttpd.git backport this from 2.1-dev: Remove formatting characters from ap_log_error() calls. These were escaped as fallout from CAN-2003-0020. Submitted by: Eric Covener Reviewed by: trawick, jorton, pquerna git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x@159355 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 7509e54697a..cb4cb854ab6 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,9 @@ Changes with Apache 2.0.54 + *) Remove formatting characters from ap_log_error() calls. These + were escaped as fallout from CAN-2003-0020. + [Eric Covener ] + *) mod_ssl: If SSLUsername is used, set r->user earlier. PR 31418. [David Reid] diff --git a/STATUS b/STATUS index 214a4f37d5d..dd0f3b5a292 100644 --- a/STATUS +++ b/STATUS @@ -98,12 +98,6 @@ PATCHES TO BACKPORT FROM TRUNK: svn rev 124104 +1: minfrin, trawick - *) Get some control chars out of ap_log_error() invocations. - Patch from Eric Covener with tweak by trawick: - http://httpd.apache.org/~trawick/covener-removecontrolchars-2.0.patch - (2.1-dev already has these fixes) - +1: trawick, jorton, pquerna - *) util_ldap: Add the directive LDAPConnectionTimeout to control the socket timeout value when binding to an LDAP server svn rev 126565 diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index f903ef6abe5..77ec80a5689 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -707,7 +707,7 @@ PROXY_DECLARE(int) ap_proxy_is_ipaddr(struct dirconn_entry *This, apr_pool_t *p) if (bits != 32) /* no warning for fully qualified IP address */ ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, - "Warning: NetMask not supplied with IP-Addr; guessing: %s/%ld\n", + "Warning: NetMask not supplied with IP-Addr; guessing: %s/%ld", inet_ntoa(This->addr), bits); } @@ -715,11 +715,11 @@ PROXY_DECLARE(int) ap_proxy_is_ipaddr(struct dirconn_entry *This, apr_pool_t *p) if (*addr == '\0' && (This->addr.s_addr & ~This->mask.s_addr) != 0) { ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, - "Warning: NetMask and IP-Addr disagree in %s/%ld\n", + "Warning: NetMask and IP-Addr disagree in %s/%ld", inet_ntoa(This->addr), bits); This->addr.s_addr &= This->mask.s_addr; ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, - " Set to %s/%ld\n", + " Set to %s/%ld", inet_ntoa(This->addr), bits); } diff --git a/modules/ssl/ssl_engine_kernel.c b/modules/ssl/ssl_engine_kernel.c index 99cd8dbb2c8..48da7405049 100644 --- a/modules/ssl/ssl_engine_kernel.c +++ b/modules/ssl/ssl_engine_kernel.c @@ -553,7 +553,7 @@ int ssl_hook_Access(request_rec *r) if (renegotiate && !renegotiate_quick && (r->method_number == M_POST)) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server, "SSL Re-negotiation in conjunction " - "with POST method not supported!\n" + "with POST method not supported! " "hint: try SSLOptions +OptRenegotiate"); return HTTP_METHOD_NOT_ALLOWED; @@ -1798,7 +1798,7 @@ void ssl_callback_LogTracingState(MODSSL_INFO_CB_ARG_TYPE ssl, int where, int rc else if (where & SSL_CB_ALERT) { char *str = (where & SSL_CB_READ) ? "read" : "write"; ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, - "%s: Alert: %s:%s:%s\n", + "%s: Alert: %s:%s:%s", SSL_LIBRARY_NAME, str, SSL_alert_type_string_long(rc), SSL_alert_desc_string_long(rc)); diff --git a/server/config.c b/server/config.c index 3ec7bc568b2..da4f4f7a922 100644 --- a/server/config.c +++ b/server/config.c @@ -1404,8 +1404,9 @@ static void process_command_config(server_rec *s, apr_array_header_t *arr, errmsg = ap_build_config(&parms, p, ptemp, conftree); if (errmsg) { ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, - "Syntax error in -C/-c directive:" APR_EOL_STR "%s", - errmsg); + "Syntax error in -C/-c directive:"); + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, + "%s", errmsg); exit(1); } diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c index 0a7ef8df223..fe89584124c 100644 --- a/server/mpm/winnt/mpm_winnt.c +++ b/server/mpm/winnt/mpm_winnt.c @@ -668,7 +668,7 @@ static int create_process(apr_pool_t *p, HANDLE *child_proc, HANDLE *child_exit_ if ((rv = apr_procattr_io_set(attr, APR_FULL_BLOCK, APR_NO_PIPE, APR_NO_PIPE)) != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, - "Parent: Unable to create child stdin pipe.\n"); + "Parent: Unable to create child stdin pipe."); apr_pool_destroy(ptemp); return -1; } @@ -679,7 +679,7 @@ static int create_process(apr_pool_t *p, HANDLE *child_proc, HANDLE *child_exit_ || ((rv = apr_procattr_child_out_set(attr, child_out, NULL)) != APR_SUCCESS)) { ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, - "Parent: Unable to connect child stdout to NUL.\n"); + "Parent: Unable to connect child stdout to NUL."); apr_pool_destroy(ptemp); return -1; } @@ -697,7 +697,7 @@ static int create_process(apr_pool_t *p, HANDLE *child_proc, HANDLE *child_exit_ if ((rv = apr_procattr_child_err_set(attr, child_err, NULL)) != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, - "Parent: Unable to connect child stderr.\n"); + "Parent: Unable to connect child stderr."); apr_pool_destroy(ptemp); return -1; } diff --git a/server/mpm_common.c b/server/mpm_common.c index dc9e2a5845e..d6bf53de6c3 100644 --- a/server/mpm_common.c +++ b/server/mpm_common.c @@ -225,8 +225,7 @@ int ap_process_child_status(apr_proc_t *pid, apr_exit_why_e why, int status) ap_log_error(APLOG_MARK, APLOG_ALERT, 0, ap_server_conf, "Child %" APR_PID_T_FMT - " returned a Fatal error..." APR_EOL_STR - "Apache is exiting!", + " returned a Fatal error... Apache is exiting!", pid->pid); return APEXIT_CHILDFATAL; }