-
Notifications
You must be signed in to change notification settings - Fork 1.7k
MULTIPART_STRICT_ERROR False Positive #2258
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
Comments
Hi @osamamaruf, you wrote:
which was released on Apr 3 2018, but this bug was fixed in 3.0.3, so the upgrade is very welcome :). Note, that 3.0.4 is still out there. EDIT: sorry, I didn't realize the quote and data before problems. That fix solved another problems. |
Buy the way, after a quick review, the 3.0.4 allows the quoted boundary (especially what you gave above). Could you show the full request (without sensitive data)? |
Hi @osamamaruf , Some of the individual conditions checked within MULTIPART_STRICT_ERROR are perfectly RFC-compliant, but are (or at least were historically) unusual, and therefore possibly suspicious. And you are correct that entirely valid requests with a Content-Type boundary directive could have its value specified within quotes. You have a couple of options:
|
@airween Thank you for the prompt response. We will upgrade. One question though the request also had hit this rule
|
Hi @osamamaruf, thanks - is there an empty line between the two lines above?
If yes, that's the "data before". For the "boudary quoted": if it's quoted, looks like a flag had been set to true, and log shows:
also if the data before boundary, I got a message:
And looks like the MULTIPART_STRICT_ERROR set to TRUE if any of these flags are set. Also check the reference. After a quick search, I can't decide that the quoted boundary error is valid or not. If you look at the variable name, which is "strict", then I assume it is (I mean it's valid). Also if you take a look to the RFC, the examples are very ambiguous: they are several example with extra data before boundary. May be that's not a strict error, but see my opinion above in case DB. If you think just disable this rule, and make some others for other multipart errors. |
The following content type header is blocked by Modsecurity:
The boundary should be allowed to have quotes.
Logs and dumps
MULTIPART_BOUNDARY_QUOTED
MULTIPART_DATA_BEFORE
The above rule have been triggered from
200003
.Expected behavior
The request should not have been blocked.
Server (please complete the following information):
Rule Set (please complete the following information):
The text was updated successfully, but these errors were encountered: