From: Eric Covener Date: Wed, 17 Jun 2015 18:28:58 +0000 (+0000) Subject: *) mod_ext_filter, mod_charset_lite: Avoid inadvertent filtering of protocol X-Git-Tag: 2.5.0-alpha~3069 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22dc0a047235e25c4d1dd33eaf13ced00bd55b1e;p=thirdparty%2Fapache%2Fhttpd.git *) mod_ext_filter, mod_charset_lite: Avoid inadvertent filtering of protocol data during read of chunked request bodies. PR 58049. [Edward Lu ] Submitted By: Edward Lu git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1686085 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index bec2489ccc3..ad7a1aee8f0 100644 --- 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 ] + *) mod_ldap: Stop leaking LDAP connections when 'LDAPConnectionPoolTTL 0' is configured. PR 58037. [Ted Phelps ] diff --git a/modules/filters/mod_charset_lite.c b/modules/filters/mod_charset_lite.c index 934f04774d4..e05517b8515 100644 --- a/modules/filters/mod_charset_lite.c +++ b/modules/filters/mod_charset_lite.c @@ -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 diff --git a/modules/filters/mod_ext_filter.c b/modules/filters/mod_ext_filter.c index 1e383f084cb..4f97acae076 100644 --- a/modules/filters/mod_ext_filter.c +++ b/modules/filters/mod_ext_filter.c @@ -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;