Bug 1371876 - Apache httpd returns "200 OK" for a request exceeding LimitRequestBody when enabling mod_ext_filter
Summary: Apache httpd returns "200 OK" for a request exceeding LimitRequestBody when e...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: httpd
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Luboš Uhliarik
QA Contact: Jan Houska
URL:
Whiteboard:
Depends On:
Blocks: 1298243 1481342
TreeView+ depends on / blocked
 
Reported: 2016-08-31 10:26 UTC by Masafumi Miura
Modified: 2019-12-16 06:34 UTC (History)
4 users (show)

Fixed In Version: httpd-2.4.6-55.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1481342 (view as bug list)
Environment:
Last Closed: 2017-08-01 21:36:44 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2175 0 normal SHIPPED_LIVE httpd bug fix update 2017-08-01 18:40:47 UTC

Description Masafumi Miura 2016-08-31 10:26:47 UTC
### Description of problem:

Apache httpd returns "200 OK" for a request exceeding LimitRequestBody when enabling mod_ext_filter.


### Version-Release number of selected component (if applicable):

httpd-2.4.6-40.el7_2.4.x86_64


### How reproducible:

Anytime


### Steps to Reproduce:

1. Configure LimitRequestBody and mod_ext_filter:

    LimitRequestBody 100
    ExtFilterDefine testfilter mode=output cmd="/bin/sed s/foo/bar/g"
    SetOutputFilter testfilter

2. Prepare a test file which is larger than LimitRequestBody

    dd if=/dev/zero of=/tmp/testfile bs=1 count=101

3. Sent a POST request with the file 

    curl -X POST -v -s -T /tmp/testfile http://127.0.0.1/test.html


### Actual results:

Apache httpd returns "200 OK"

~~~
$ curl -X POST -v -s -T /tmp/testfile 127.0.0.1/test.html
...
> POST /test.html HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: 127.0.0.1
> Accept: */*
> Content-Length: 101
> Expect: 100-continue
> 
< HTTP/1.1 200 OK
< Date: Wed, 31 Aug 2016 10:08:21 GMT
< Server: Apache/2.2.15 (Red Hat)
< Content-Length: 0
< Connection: close
< Content-Type: text/html; charset=UTF-8
< 
~~~


### Expected results:

Apache httpd should return "413 Request Entity Too Large".


### Additional info:

You can workaround this by using mod_substitute instead if it can cover your requirement. For example:

~~~
SetOutputFilter SUBSTITUTE
Substitute s/foo/bar/i
~~~

Comment 6 errata-xmlrpc 2017-08-01 21:36:44 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2175


Note You need to log in before you can comment on or make changes to this bug.