Closed peasfarmer closed 11 months ago
Hi @peasfarmer thanks for coming by. I wonder what connector of coraza are you using, if it is the http one we do check that the response body is the expected one in this test https://github.com/corazawaf/coraza/blob/main/http/middleware_test.go#L467.
I use caddy+coraza_waf, the caddyfile is as follows:
http://xx345.test.com:80 {
coraza_waf {
#load_owasp_crs
directives `
Include rules/@coraza.conf-recommended
Include rules/@crs-setup.conf.example
Include rules/@owasp_crs/*.conf
SecRuleEngine on
SecResponseBodyLimit 1024
SecResponseBodyLimitAction ProcessPartial
`
}
reverse_proxy {
to https://www.baidu.com
header_up Host www.baidu.com
header_up Accept-Encoding identity
}
}
you can see from the screenshot, the html has no
Description
I'm encountering an issue with the Coraza WAF. When I set the
SecResponseBodyLimit
to 100K and also setSecResponseBodyLimitAction
toProcessPartial
, I expected the WAF to check only the first 100K of the response and send the complete body to the client when the response is large. However, I observed that Coraza WAF is only sending 100K to the client and not delivering the exceeding portion. Similarly, I've also encountered a problem with the SecRequestBodyLimitAction parameter.Steps to reproduce
SecResponseBodyLimit
set to 100K andSecResponseBodyLimitAction
set toProcessPartial
.Expected result
The expected behavior is that Coraza WAF should process only the first 100K of the response content but still deliver the complete body to the client when the response is larger.
Actual result
The actual result is that Coraza WAF restricts the response to 100K and does not provide the exceeding portion to the client.