You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ja...@apache.org on 2020/07/03 19:53:38 UTC
svn commit: r1879490 - in /httpd/httpd/branches/2.4.x: ./ modules/filters/
modules/http2/ modules/ldap/ modules/md/ modules/proxy/ modules/session/
server/ support/
Author: jailletc36
Date: Fri Jul 3 19:53:37 2020
New Revision: 1879490
URL: http://svn.apache.org/viewvc?rev=1879490&view=rev
Log:
Merge r1612945, r1734835, r1738875, r1833416, r1842898, r1867257, r1876745, r1876807, r1876823, r1877642 from trunk
Easy patches: synch 2.4.x and trunk
- core: Re-introduce check for sufficient PCRE version.
- core: Fix doc string for QualifyRedirectURL
- mod_proxy: really return an error message on invalid "flusher" value.
- mod_http2: Remove extra and un-needed ""
- mod_ldap: fix a (unlikely) memory leak
- ab: fix a typo
- suexec: Report error string after failure from setgid/initgroups or setuid
- mod_session_crypto: be less specific and don't echo passphrase
- mod_proxy_html: Fix proxy_html_conf.bufsz to have correct type, as
it is used with ap_set_int_slot.
- mod_md: update duplicated APLOGNOs.
Submitted by: fuankg, trawick, ylavic, jailletc36, jorton, jailletc36, jorton, covener, jorton, ylavic
Reviewed by: jailletc36, jim, ylavic
Backported by: jailletc36
Modified:
httpd/httpd/branches/2.4.x/ (props changed)
httpd/httpd/branches/2.4.x/modules/filters/mod_proxy_html.c
httpd/httpd/branches/2.4.x/modules/http2/h2_session.c
httpd/httpd/branches/2.4.x/modules/ldap/util_ldap_cache_mgr.c
httpd/httpd/branches/2.4.x/modules/md/mod_md.c
httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c
httpd/httpd/branches/2.4.x/modules/session/mod_session_crypto.c
httpd/httpd/branches/2.4.x/server/core.c
httpd/httpd/branches/2.4.x/server/util_pcre.c
httpd/httpd/branches/2.4.x/support/ab.c
httpd/httpd/branches/2.4.x/support/suexec.c
Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
Merged /httpd/httpd/trunk:r1612945,1734835,1738875,1833416,1842898,1867257,1876745,1876807,1876823,1877642
Modified: httpd/httpd/branches/2.4.x/modules/filters/mod_proxy_html.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/filters/mod_proxy_html.c?rev=1879490&r1=1879489&r2=1879490&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/filters/mod_proxy_html.c (original)
+++ httpd/httpd/branches/2.4.x/modules/filters/mod_proxy_html.c Fri Jul 3 19:53:37 2020
@@ -107,7 +107,7 @@ typedef struct {
const char *doctype;
const char *etag;
unsigned int flags;
- size_t bufsz;
+ int bufsz;
apr_hash_t *links;
apr_array_header_t *events;
const char *charset_out;
Modified: httpd/httpd/branches/2.4.x/modules/http2/h2_session.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/http2/h2_session.c?rev=1879490&r1=1879489&r2=1879490&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/http2/h2_session.c (original)
+++ httpd/httpd/branches/2.4.x/modules/http2/h2_session.c Fri Jul 3 19:53:37 2020
@@ -1285,7 +1285,7 @@ apr_status_t h2_session_set_prio(h2_sess
rv = nghttp2_session_change_stream_priority(session->ngh2, stream->id, &ps);
ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
- ""H2_STRM_LOG(APLOGNO(03203), stream,
+ H2_STRM_LOG(APLOGNO(03203), stream,
"PUSH %s, weight=%d, depends=%d, returned=%d"),
ptype, ps.weight, ps.stream_id, rv);
status = (rv < 0)? APR_EGENERAL : APR_SUCCESS;
Modified: httpd/httpd/branches/2.4.x/modules/ldap/util_ldap_cache_mgr.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/ldap/util_ldap_cache_mgr.c?rev=1879490&r1=1879489&r2=1879490&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/ldap/util_ldap_cache_mgr.c (original)
+++ httpd/httpd/branches/2.4.x/modules/ldap/util_ldap_cache_mgr.c Fri Jul 3 19:53:37 2020
@@ -280,7 +280,7 @@ void util_ald_cache_purge(util_ald_cache
*/
util_url_node_t *util_ald_create_caches(util_ldap_state_t *st, const char *url)
{
- util_url_node_t curl, *newcurl = NULL;
+ util_url_node_t curl;
util_ald_cache_t *search_cache;
util_ald_cache_t *compare_cache;
util_ald_cache_t *dn_compare_cache;
@@ -313,7 +313,6 @@ util_url_node_t *util_ald_create_caches(
/* check that all the caches initialised successfully */
if (search_cache && compare_cache && dn_compare_cache) {
-
/* The contents of this structure will be duplicated in shared
memory during the insert. So use stack memory rather than
pool memory to avoid a memory leak. */
@@ -323,11 +322,16 @@ util_url_node_t *util_ald_create_caches(
curl.compare_cache = compare_cache;
curl.dn_compare_cache = dn_compare_cache;
- newcurl = util_ald_cache_insert(st->util_ldap_cache, &curl);
-
+ return util_ald_cache_insert(st->util_ldap_cache, &curl);
}
+ else {
+ /* util_ald_destroy_cache is a noop for a NULL argument. */
+ util_ald_destroy_cache(search_cache);
+ util_ald_destroy_cache(compare_cache);
+ util_ald_destroy_cache(dn_compare_cache);
- return newcurl;
+ return NULL;
+ }
}
Modified: httpd/httpd/branches/2.4.x/modules/md/mod_md.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/md/mod_md.c?rev=1879490&r1=1879489&r2=1879490&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/md/mod_md.c (original)
+++ httpd/httpd/branches/2.4.x/modules/md/mod_md.c Fri Jul 3 19:53:37 2020
@@ -592,7 +592,7 @@ static apr_status_t link_md_to_servers(m
uri = md_util_schemify(p, s->server_admin, "mailto");
if (md_array_str_index(md->contacts, uri, 0, 0) < 0) {
APR_ARRAY_PUSH(md->contacts, const char *) = uri;
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, base_server, APLOGNO(10044)
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, base_server, APLOGNO(10237)
"%s: added contact %s", md->name, uri);
}
}
@@ -1099,7 +1099,7 @@ static apr_status_t get_certificate(serv
}
else if (sc->assigned->nelts != 1) {
if (!fallback) {
- ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(10042)
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(10238)
"conflict: %d MDs match Virtualhost %s which uses SSL, however "
"there can be at most 1.",
(int)sc->assigned->nelts, s->server_hostname);
Modified: httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c?rev=1879490&r1=1879489&r2=1879490&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c (original)
+++ httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c Fri Jul 3 19:53:37 2020
@@ -308,10 +308,10 @@ static const char *set_worker_param(apr_
worker->s->conn_timeout_set = 1;
}
else if (!strcasecmp(key, "flusher")) {
- if (strlen(val) >= sizeof(worker->s->flusher))
- apr_psprintf(p, "flusher name length must be < %d characters",
- (int)sizeof(worker->s->flusher));
- PROXY_STRNCPY(worker->s->flusher, val);
+ if (PROXY_STRNCPY(worker->s->flusher, val) != APR_SUCCESS) {
+ return apr_psprintf(p, "flusher name length must be < %d characters",
+ (int)sizeof(worker->s->flusher));
+ }
}
else if (!strcasecmp(key, "upgrade")) {
if (PROXY_STRNCPY(worker->s->upgrade, val) != APR_SUCCESS) {
Modified: httpd/httpd/branches/2.4.x/modules/session/mod_session_crypto.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/session/mod_session_crypto.c?rev=1879490&r1=1879489&r2=1879490&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/session/mod_session_crypto.c (original)
+++ httpd/httpd/branches/2.4.x/modules/session/mod_session_crypto.c Fri Jul 3 19:53:37 2020
@@ -293,7 +293,7 @@ static apr_status_t encrypt_string(reque
*cipher, APR_MODE_CBC, 1, 4096, f, r->pool);
if (APR_STATUS_IS_ENOKEY(res)) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, res, r, APLOGNO(01825)
- "the passphrase '%s' was empty", passphrase);
+ "failure generating key from passphrase");
}
if (APR_STATUS_IS_EPADDING(res)) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, res, r, APLOGNO(01826)
@@ -415,7 +415,7 @@ static apr_status_t decrypt_string(reque
f, r->pool);
if (APR_STATUS_IS_ENOKEY(res)) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, res, r, APLOGNO(01832)
- "the passphrase '%s' was empty", passphrase);
+ "failure generating key from passphrase");
continue;
}
else if (APR_STATUS_IS_EPADDING(res)) {
Modified: httpd/httpd/branches/2.4.x/server/core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/core.c?rev=1879490&r1=1879489&r2=1879490&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/server/core.c (original)
+++ httpd/httpd/branches/2.4.x/server/core.c Fri Jul 3 19:53:37 2020
@@ -4514,8 +4514,8 @@ AP_INIT_FLAG("CGIPassAuth", set_cgi_pass
AP_INIT_TAKE2("CGIVar", set_cgi_var, NULL, OR_FILEINFO,
"Controls how some CGI variables are set"),
AP_INIT_FLAG("QualifyRedirectURL", set_qualify_redirect_url, NULL, OR_FILEINFO,
- "Controls whether HTTP authorization headers, normally hidden, will "
- "be passed to scripts"),
+ "Controls whether the REDIRECT_URL environment variable is fully "
+ "qualified"),
AP_INIT_TAKE1("ForceType", ap_set_string_slot_lower,
(void *)APR_OFFSETOF(core_dir_config, mime_type), OR_FILEINFO,
Modified: httpd/httpd/branches/2.4.x/server/util_pcre.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/util_pcre.c?rev=1879490&r1=1879489&r2=1879490&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/server/util_pcre.c (original)
+++ httpd/httpd/branches/2.4.x/server/util_pcre.c Fri Jul 3 19:53:37 2020
@@ -57,6 +57,11 @@ POSSIBILITY OF SUCH DAMAGE.
#include "apr_tables.h"
#include "pcre.h"
+/* PCRE_DUPNAMES is only present since version 6.7 of PCRE */
+#ifndef PCRE_DUPNAMES
+#error PCRE Version 6.7 or later required!
+#else
+
#define APR_WANT_STRFUNC
#include "apr_want.h"
@@ -342,4 +347,6 @@ AP_DECLARE(int) ap_regname(const ap_rege
return namecount;
}
+#endif /* PCRE_DUPNAMES defined */
+
/* End of pcreposix.c */
Modified: httpd/httpd/branches/2.4.x/support/ab.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/support/ab.c?rev=1879490&r1=1879489&r2=1879490&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/support/ab.c (original)
+++ httpd/httpd/branches/2.4.x/support/ab.c Fri Jul 3 19:53:37 2020
@@ -18,7 +18,7 @@
** This program is based on ZeusBench V1.0 written by Adam Twiss
** which is Copyright (c) 1996 by Zeus Technology Ltd. http://www.zeustech.net/
**
- ** This software is provided "as is" and any express or implied waranties,
+ ** This software is provided "as is" and any express or implied warranties,
** including but not limited to, the implied warranties of merchantability and
** fitness for a particular purpose are disclaimed. In no event shall
** Zeus Technology Ltd. be liable for any direct, indirect, incidental, special,
Modified: httpd/httpd/branches/2.4.x/support/suexec.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/support/suexec.c?rev=1879490&r1=1879489&r2=1879490&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/support/suexec.c (original)
+++ httpd/httpd/branches/2.4.x/support/suexec.c Fri Jul 3 19:53:37 2020
@@ -502,7 +502,8 @@ int main(int argc, char *argv[])
* and setgid() to the target group. If unsuccessful, error out.
*/
if (((setgid(gid)) != 0) || (initgroups(actual_uname, gid) != 0)) {
- log_err("failed to setgid (%lu: %s)\n", (unsigned long)gid, cmd);
+ log_err("failed to setgid/initgroups (%lu: %s): %s\n",
+ (unsigned long)gid, cmd, strerror(errno));
exit(109);
}
@@ -510,7 +511,8 @@ int main(int argc, char *argv[])
* setuid() to the target user. Error out on fail.
*/
if ((setuid(uid)) != 0) {
- log_err("failed to setuid (%lu: %s)\n", (unsigned long)uid, cmd);
+ log_err("failed to setuid (%lu: %s): %s\n",
+ (unsigned long)uid, cmd, strerror(errno));
exit(110);
}