]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1686085 from trunk:
authorJim Jagielski <jim@apache.org>
Thu, 18 Jun 2015 17:05:28 +0000 (17:05 +0000)
committerJim Jagielski <jim@apache.org>
Thu, 18 Jun 2015 17:05:28 +0000 (17:05 +0000)
*) mod_ext_filter, mod_charset_lite: Avoid inadvertent filtering of protocol
   data during read of chunked request bodies. PR 58049.
   [Edward Lu <Chaosed0 gmail.com>]

Submitted By: Edward Lu <Chaosed0 gmail.com>

Submitted by: covener
Reviewed/backported by: jim

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

CHANGES
STATUS
modules/filters/mod_charset_lite.c
modules/filters/mod_ext_filter.c

diff --git a/CHANGES b/CHANGES
index 6e28a3f2ba57818936ca07f10b0504c73789db27..05409abdb61c8cc4236fc813b48aaadb052cb1e3 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,10 @@
 
 Changes with Apache 2.4.15
 
+  *) mod_ext_filter, mod_charset_lite: Avoid inadvertent filtering of protocol
+     data during read of chunked request bodies. PR 58049. 
+     [Edward Lu <Chaosed0 gmail.com>]
+
   *) core: Allow spaces after chunk-size for compatibility with implementations
      using a pre-filled buffer.  [Yann Ylavic, Jeff Trawick]
 
diff --git a/STATUS b/STATUS
index 7e3591fa546aa5da3ad212279b08ac0d2ad5fd86..db714a00329999499f3f11daae11bc0b8f48aa40 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -107,11 +107,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  *) mod_charset_lite, mod_ext_filter:  Avoid inadvertent filtering of protocol
-     data during read of chunked request bodies. PR 58049.
-     trunk patch: http://svn.apache.org/r1686085
-     2.4.x patch: trunk works
-     +1 covener, trawick, ylavic
 
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
index 934f04774d42e11a464ba431462ac13dc86b1369..e05517b8515ed2b88ff60fdf0235c72319b4e1f0 100644 (file)
@@ -984,6 +984,11 @@ static apr_status_t xlate_in_filter(ap_filter_t *f, apr_bucket_brigade *bb,
     apr_size_t buffer_size;
     int hit_eos;
 
+    /* just get out of the way of things we don't want. */
+    if (mode != AP_MODE_READBYTES) {
+        return ap_get_brigade(f->next, bb, mode, block, readbytes);
+    }
+
     if (!ctx) {
         /* this is SetInputFilter path; grab the preallocated context,
          * if any; note that if we decided not to do anything in an earlier
index 1e383f084cb220f7234a16fa55bb180b275efa75..4f97acae07688373ec1caed4fb5e03ab782c64d1 100644 (file)
@@ -891,6 +891,11 @@ static apr_status_t ef_input_filter(ap_filter_t *f, apr_bucket_brigade *bb,
     ef_ctx_t *ctx = f->ctx;
     apr_status_t rv;
 
+    /* just get out of the way of things we don't want. */
+    if (mode != AP_MODE_READBYTES) {
+        return ap_get_brigade(f->next, bb, mode, block, readbytes);
+    }
+
     if (!ctx) {
         if ((rv = init_filter_instance(f)) != APR_SUCCESS) {
             ctx = f->ctx;