]> granicus.if.org Git - apache/commitdiff
*) mod_ext_filter, mod_charset_lite: Avoid inadvertent filtering of protocol
authorEric Covener <covener@apache.org>
Wed, 17 Jun 2015 18:28:58 +0000 (18:28 +0000)
committerEric Covener <covener@apache.org>
Wed, 17 Jun 2015 18:28:58 +0000 (18:28 +0000)
   data during read of chunked request bodies. PR 58049.
   [Edward Lu <Chaosed0 gmail.com>]

Submitted By: Edward Lu <Chaosed0 gmail.com>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1686085 13f79535-47bb-0310-9956-ffa450edef68

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

diff --git a/CHANGES b/CHANGES
index bec2489ccc33218fe0684e4d73e3ea4218548c94..ad7a1aee8f0447b3cb68c0f7f41937e8f3879cd5 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) 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>]
+
   *) mod_ldap: Stop leaking LDAP connections when 'LDAPConnectionPoolTTL 0' 
      is configured.  PR 58037.  [Ted Phelps <phelps gnusto.com>]
 
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;