Fix SecRequestBody(NoFiles)Limit overflow#3419
Fix SecRequestBody(NoFiles)Limit overflow#3419airween wants to merge 4 commits intoowasp-modsecurity:v3/masterfrom
Conversation
|
This PR is working in progress. @jonathansmith9485, @SonNgo2211, @EsadCetiner - please take a review this. |
|
@airween I just tested your PR and I'm still getting blocked by
|
Thanks, I can check this soon. |
|
|
I'm going to close this PR, because I completely rewritten the |



what
This PR fixes the possible overflow of
SecRequestBodyLimitandSecRequestBodyNoFilesLimitdirectives.why
There are two reported issues:
SecRequestBodyNoFilesLimitis set to a very high value #3356There are a few problems in handling these config variables:
doublebefore this patch - this makes no sense, there is no 1234.6 bytes...atoi(), which gives an integer with different bitsizeTherefore if a user gave an extra high value, then the
atoi()converted it into a negative value.references
Fixes #3356 and #3352
side note
Now there is no hardcoded limit for these values. Beside of that if the admin gives
0(zero) value then the engine allows unlimited bytes.I want to stop this, which means if the value of these variables aren't set or set to 0, that means the value is
0and engine will allow only0byte. Hopefully this will force the admin to set an explicit value.