You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2016/09/06 13:49:11 UTC
[Bug 60088] New: mod_ext_filter did not work if post body size
larger than 8192 bytes
https://bz.apache.org/bugzilla/show_bug.cgi?id=60088
Bug ID: 60088
Summary: mod_ext_filter did not work if post body size larger
than 8192 bytes
Product: Apache httpd-2
Version: 2.4.6
Hardware: PC
OS: Linux
Status: NEW
Severity: major
Priority: P2
Component: mod_ext_filter
Assignee: bugs@httpd.apache.org
Reporter: andre.rothe@phosco.info
httpd.conf:
ExtFilterDefine MyInFilter mode=input cmd="/path/to/filters/request_filter.php"
<Location "/mywebapplication-url">
setInputFilter MyInFilter
ExtFilterOptions LogStderr
LimitRequestBody 0
</Location>
My filter code:
#!/usr/bin/php
<?php
function processFilter() {
$stdin = file_get_contents('php://stdin');
if (empty($stdin)) {
error_log("empty request");
return $stdin;
}
// do filter work here, do nothing for test
return $stdin;
}
error_log("Filter starts");
$before = microtime(true);
print(processFilter());
$after = microtime(true);
error_log("Filter needs: " . ($after-$before) ." s");
?>
If I post a request with data larger than 8192 bytes, my filter won't be called
and the request dies with an error:
[Tue Sep 06 09:58:09.470309 2016] [ext_filter:trace1] [pid 15343]
mod_ext_filter.c(629): [client 192.168.50.26:46497] filtering `/an-URL' of type
`(unspecified)' through `/path/to/filters/request_filter.php', cfg
ExtFilterOptions LogStderr !PreserveContentLength ExtFilterInType
application/x-www-form-urlencoded ExtFilterOuttype (unchanged), referer:
https://another-URL
[Tue Sep 06 09:58:09.470399 2016] [ext_filter:trace6] [pid 15343]
mod_ext_filter.c(807): (11)Resource temporarily unavailable: [client
192.168.50.26:46497] AH01466: apr_file_read(child output), len
18446744073709551615, referer: https://another-URL
[Tue Sep 06 09:58:09.470441 2016] [:error] [pid 15343] Sending error response:
The request contained fewer content data than specified by the content-length
header
I have recompiled the mod_ext_filter.c with a lot of log output and I found a
discrepancy in ef_unified_filter(), where the apr_bucket_read() gets only 8192
bytes, but the ef_input_filter() reads just before i.e. 9827 bytes from the
current brigade.
There is only one bucket within the brigade and the for-loop in
ef_unified_filter() runs therefore only once. The result is the different
content length from the error message, but at the moment I cannot find a
solution for that.
It is not a PHP-specific problem, I have tested it with a Bash-script filter
too. Also I have tested w/o LimitRequestBody.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 60088] mod_ext_filter did not work if post body size larger
than 8192 bytes
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60088
andre.rothe@phosco.info changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|2.4.6 |2.4.20
--- Comment #1 from andre.rothe@phosco.info ---
I have checked the problem on 2.4.20 and it is still present. In the
/var/log/audit/audit.log I can see:
type=ANOM_ABEND msg=audit(1473319986.976:46188): auid=4294967295 uid=48 gid=48
ses=4294967295 subj=system_u:system_r:httpd_t:s0 pid=15702 comm="httpd"
reason="memory violation" sig=11
just after processing the request.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 60088] mod_ext_filter did not work if post body size larger
than 8192 bytes
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60088
Joe Orton <jo...@redhat.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #2 from Joe Orton <jo...@redhat.com> ---
Can you retest with 2.4.25? I can't reproduce the error here from that
config/filter combination.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org