-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
GET request with application/json and valid JSON being returned trips 200002 #1767
Comments
@troykelly Which version of ModSecurity you are using? Please provide as much detail as possible so the community can better assist you. Thanks. |
@victorhora Thank you for getting back to me.
When we have ModSecurity enabled for that host - it triggers rule 200002. |
Hi @troykelly it seems like the behaviour between v2 and v3 are different even when compared to results of testing with at #1392. We will be looking into this. In the meantime, I would suggest that you disable or change rule 200002 as a temporary workaround. Thanks for reporting! |
As a work around, would chaining rule 200001 like below exclude it from processing the request body on GET requests that FWR include the Content-Type: application/json header BEFORE: AFTER: I've tested it and it seems to work for me. |
I will have to see if I can do that from the nginx config (I'm new here - not so great at rules and configs) and give it a go. |
Regression test to reproduce that issue: https://gist.github.com/zimmerle/7cd25538a7f2a1b7fa977d4b0b8dc5e3 |
I am not sure if that is a bug or a feature. After all, the header is telling ModSecurity that there is o JSON to come and it never came, so it naturally raise: parse error: premature EOF\x0a. Similar to the scenario described on: #1392. I think the suggestion given @johnfilo is valid and it has a semantic in the context of the application in question. Therefore, I am closing this as an issue, but, feel free to continue the discussion in case you have a different point of view. |
Making a GET request with Content-Type of application/json seems to trigger error 200002 even when the server response is valid JSON.
I feel like this could be related to #1392 - but we are returning a valid JSON body
The text was updated successfully, but these errors were encountered: