]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Backport to v2.4:
authorGraham Leggett <minfrin@apache.org>
Sun, 17 Jan 2021 17:07:42 +0000 (17:07 +0000)
committerGraham Leggett <minfrin@apache.org>
Sun, 17 Jan 2021 17:07:42 +0000 (17:07 +0000)
  *) Easy patches: synch 2.4.x and trunk
        - mod_dav: save a few cycles
        - mod_{ssl,md}: init_stapling_status hooks should return an int
        - util_md5: avoid temporary stack result in ap_md5_binary()
        - mod_proxy_balancer: Add a missing </tr>
        - mod_md: get_stapling_status hooks should return an int
        - mod_session: Improve a message about SessionExpiryUpdateInterval values
     trunk patch:
          http://svn.apache.org/r1837388
          http://svn.apache.org/r1876549
          http://svn.apache.org/r1877551
          http://svn.apache.org/r1882210
          http://svn.apache.org/r1882399
          http://svn.apache.org/r1883414
     2.4.x patch: svn merge -c 1837388,1876549,1877551,1882210,1882399,1883414 ^/httpd/httpd/trunk .
     +1: jailletc36, ylavic, minfrin

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1885610 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/dav/main/mod_dav.c
modules/md/mod_md_ocsp.c
modules/md/mod_md_ocsp.h
modules/proxy/mod_proxy_balancer.c
modules/session/mod_session.c
modules/ssl/ssl_util_stapling.c
server/util_md5.c

diff --git a/CHANGES b/CHANGES
index cd2474fec81c361ef1d2e989b512b10639e3de7e..79c5868ac7cc2ed435a45b83db2fc05dcc1e3da0 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,15 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.4.47
 
+  *) Synch 2.4.x and trunk
+       - mod_dav: save a few cycles
+       - mod_{ssl,md}: init_stapling_status hooks should return an int
+       - util_md5: avoid temporary stack result in ap_md5_binary()
+       - mod_proxy_balancer: Add a missing </tr>
+       - mod_md: get_stapling_status hooks should return an int
+       - mod_session: Improve a message about SessionExpiryUpdateInterval values
+     [Christophe Jaillet]
+
   *) mod_proxy_fcgi: Honor "SetEnv proxy-sendcl" to forward a chunked
      Transfer-Encoding from the client, spooling the request body when needed
      to provide a Content-Length to the backend.  PR 57087.  [Yann Ylavic]
diff --git a/STATUS b/STATUS
index 0cd3d62bc6246717f73ea55a80c4bd398f6ec3fc..5ff61beda81b75ebb31c576271a719d1f10ae297 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -138,23 +138,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  *) Easy patches: synch 2.4.x and trunk
-        - mod_dav: save a few cycles
-        - mod_{ssl,md}: init_stapling_status hooks should return an int
-        - util_md5: avoid temporary stack result in ap_md5_binary()
-        - mod_proxy_balancer: Add a missing </tr>
-        - mod_md: get_stapling_status hooks should return an int
-        - mod_session: Improve a message about SessionExpiryUpdateInterval values
-     trunk patch:
-          http://svn.apache.org/r1837388
-          http://svn.apache.org/r1876549
-          http://svn.apache.org/r1877551
-          http://svn.apache.org/r1882210
-          http://svn.apache.org/r1882399
-          http://svn.apache.org/r1883414
-     2.4.x patch: svn merge -c 1837388,1876549,1877551,1882210,1882399,1883414 ^/httpd/httpd/trunk .
-     +1: jailletc36, ylavic, minfrin
-
 
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
index bf049df332c2b34587cfab16b6a6fea1889acd9e..d0dc1104229c4500cc63d77a5b87c39cf0ed47ef 100644 (file)
@@ -807,8 +807,8 @@ static int dav_parse_range(request_rec *r,
 
     range = apr_pstrdup(r->pool, range_c);
     if (strncasecmp(range, "bytes ", 6) != 0
-        || (dash = ap_strchr(range, '-')) == NULL
-        || (slash = ap_strchr(range, '/')) == NULL) {
+        || (dash = ap_strchr(range + 6, '-')) == NULL
+        || (slash = ap_strchr(range + 6, '/')) == NULL) {
         /* malformed header */
         return -1;
     }
index fcc0a98160c5d912b30cf12ed93ad9ab647177a4..2a01d5a846729dfa572433aa1d985278c460d52d 100644 (file)
@@ -52,7 +52,7 @@ static int staple_here(md_srv_conf_t *sc)
             && md_config_geti(sc, MD_CONFIG_STAPLE_OTHERS));
 }
 
-apr_status_t md_ocsp_init_stapling_status(server_rec *s, apr_pool_t *p, 
+int md_ocsp_init_stapling_status(server_rec *s, apr_pool_t *p, 
                                           X509 *cert, X509 *issuer)
 {
     md_srv_conf_t *sc;
@@ -75,7 +75,7 @@ declined:
     return DECLINED;
 }
 
-apr_status_t md_ocsp_get_stapling_status(unsigned char **pder, int *pderlen, 
+int md_ocsp_get_stapling_status(unsigned char **pder, int *pderlen, 
                                          conn_rec *c, server_rec *s, X509 *cert)
 {
     md_srv_conf_t *sc;
index b0894caf1158140b1af5bff555bc4ec78b40ba22..ee58df678a7a746b412eb8cef81eb55c04060ff0 100644 (file)
 #define mod_md_md_ocsp_h
 
 
-apr_status_t md_ocsp_init_stapling_status(server_rec *s, apr_pool_t *p, 
-                                          X509 *cert, X509 *issuer);
+int md_ocsp_init_stapling_status(server_rec *s, apr_pool_t *p, 
+                                 X509 *cert, X509 *issuer);
 
-apr_status_t md_ocsp_get_stapling_status(unsigned char **pder, int *pderlen, 
-                                         conn_rec *c, server_rec *s, X509 *cert);
+int md_ocsp_get_stapling_status(unsigned char **pder, int *pderlen, 
+                                conn_rec *c, server_rec *s, X509 *cert);
                           
 /**
  * Start watchdog for retrieving/updating ocsp status.
index f5b0ce1adb24f9acec3846069756bdecf359a165..39ccf52a94e991083c3a192f339327ddf0670e6c 100644 (file)
@@ -1750,7 +1750,7 @@ static int balancer_handler(request_rec *r)
             ap_rvputs(r, balancer->s->vpath, "</td>\n", NULL);
             ap_rprintf(r, "<td>%s</td>\n",
                        !balancer->s->inactive ? "Yes" : "No");
-            ap_rputs("</table>\n<br />", r);
+            ap_rputs("</tr>\n</table>\n<br />", r);
             ap_rputs("\n\n<table><tr>"
                 "<th>Worker URL</th>"
                 "<th>Route</th><th>RouteRedir</th>"
index b72ab140c6e73490caaf9c419aff9ed79412809d..e5a3a774e020ca20a0976d61303b36ebae4382b6 100644 (file)
@@ -649,7 +649,7 @@ static const char *
 
     conf->expiry_update_time = atoi(arg);
     if (conf->expiry_update_time < 0) {
-        return "SessionExpiryUpdateInterval must be positive or nul";
+        return "SessionExpiryUpdateInterval must be zero (disable) or a positive value";
     }
     conf->expiry_update_time = apr_time_from_sec(conf->expiry_update_time);
     conf->expiry_update_set = 1;
index b85a9c94f13a182cb43b0027560116d592f6e7bd..15415934972f2cd44e25162b0a020a76846ee97c 100644 (file)
@@ -153,7 +153,7 @@ int ssl_stapling_init_cert(server_rec *s, apr_pool_t *p, apr_pool_t *ptemp,
         return 1;
     }
 
-    if (ssl_run_init_stapling_status(s, p, x, issuer) == APR_SUCCESS) {
+    if (ssl_run_init_stapling_status(s, p, x, issuer) == OK) {
         /* Someone's taken over or mod_ssl's own implementation is not enabled */
         if (mctx->stapling_enabled != TRUE) {
             SSL_CTX_set_tlsext_status_cb(mctx->ssl_ctx, stapling_cb);
index 148c60ceb43271228139ceb777ce75f6b3ba98c2..bba3b88e423661ed3ed0e122b15d8647ae5cc5d6 100644 (file)
@@ -54,7 +54,7 @@ AP_DECLARE(char *) ap_md5_binary(apr_pool_t *p, const unsigned char *buf, int le
 {
     apr_md5_ctx_t my_md5;
     unsigned char hash[APR_MD5_DIGESTSIZE];
-    char result[2 * APR_MD5_DIGESTSIZE + 1];
+    char *result;
 
     /*
      * Take the MD5 hash of the string argument.
@@ -67,9 +67,9 @@ AP_DECLARE(char *) ap_md5_binary(apr_pool_t *p, const unsigned char *buf, int le
     apr_md5_update(&my_md5, buf, (unsigned int)length);
     apr_md5_final(hash, &my_md5);
 
-    ap_bin2hex(hash, APR_MD5_DIGESTSIZE, result);
-
-    return apr_pstrndup(p, result, APR_MD5_DIGESTSIZE*2);
+    result = apr_palloc(p, 2 * APR_MD5_DIGESTSIZE + 1);
+    ap_bin2hex(hash, APR_MD5_DIGESTSIZE, result); /* sets final '\0' */
+    return result;
 }
 
 AP_DECLARE(char *) ap_md5(apr_pool_t *p, const unsigned char *string)