-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conflict between missing/empty host CRS tests and setting "Host" header from dest_addr override #129
Comments
Ping @theseion |
You're right, running those tests with a I think what's missing is that the headers should also be applied from the overrides. But that's probably a different issue. The reason we only set the I suspect that they are using go-ftw with their own test suite, not with CRS, which is why this issue never came up before. |
One way to fix this issue would be to add a flag for toggling this behaviour, e.g., ---
testoverride:
input:
dest_addr: "10.10.1.2"
override_empty_host_header: false |
Hi @theseion, thanks! I was misinterpreting a bit the feature. I thought that what would have been useful was an option to replace the dummy That being said, I followed your idea and created a PR that implements |
Hi!
I'm debugging CRS tests
920280-1
and920290-1
that are failing against Coraza. It seems that there is a conflict between these specific tests (They are trying to send a request without a Host header or with an empty one) and the feature added in feat: set "Host" header from dest_addr override.When a destination address override is provided, the feature replaces the empty host field with the destination address making the request a valid one.
It is not happening against Apache-Modsec (and CRS CI) because I think that destination overriding is not used there. A small ftw config like the following reproduces the issue:
I may be missing something about #63, but I'm wondering why the
host
header is replaced only when== ""
? I was expecting that this feature was mainly intended for replacing all theHost: "localhost"
spread across the rulesI gave it a little go (just replacing
==
with!=
, see this branch):920280-1
and920290-1
would be fixed, but["920270-4" "920350-1" "920350-3" "920350-4" "920350-5" "920350-6" "931130-9" "931130-11" "931130-15" "980170-2"]
start to fail.It happens because, for example in test
920270-4
, a manipulated host is replaced by a legit one (localhost%00
->localhost
).Thanks for any input about it!
The text was updated successfully, but these errors were encountered: