Skip to content
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

Use long long instead of int for comparison, increment, decrement operations and persistent collections #2134

Open
wants to merge 1 commit into
base: v2/master
Choose a base branch
from

Conversation

Nakaner
Copy link

@Nakaner Nakaner commented Jul 17, 2019

We are using ModSecurity at a download service for large files (hundreds of MB to multiple GB) to manage usage quotas (currently the number of connections per IP address). ModSecurity is able to manage traffic quotas by IP address but this is currently limited to 2^31 bytes because the counters are use the int type only. Using 64 bit integers allows to use ModSecurity to enforce traffic quotas beyond 4 GB.

Support for 64 bit integer is lacking in ModSecurity 3 as well. We run version 2 with Apache and this is basically our patch of the Debian package.

…tent collections.

Up to now, all comparison operators (@gt, @lt, @eq, …), the =+ and =-
operator for setvar, deprecatevar and persistent collections use 32 bit
integers. Using 64 bit integers allows to use ModSecurity to enforce
traffic quotas.
@victorhora victorhora requested a review from zimmerle July 24, 2019 18:50
@victorhora victorhora added 2.x Related to ModSecurity version 2.x enhancement pr available labels Jul 24, 2019
@victorhora victorhora added this to the v2.9.4 milestone Jul 24, 2019
Copy link

@marcstern marcstern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using long long is a must

@martinhsv martinhsv removed this from the v2.9.4 milestone Nov 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Related to ModSecurity version 2.x enhancement pr available
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants