Fix SecRequestBody(NoFiles)Limit overflow #3419
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
what
This PR fixes the possible overflow of
SecRequestBodyLimit
andSecRequestBodyNoFilesLimit
directives.why
There are two reported issues:
SecRequestBodyNoFilesLimit
is set to a very high value #3356There are a few problems in handling these config variables:
double
before 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
0
and engine will allow only0
byte. Hopefully this will force the admin to set an explicit value.