Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

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

Open
Nakaner wants to merge 1 commit into owasp-modsecurity:v2/master
base: v2/master
Choose a base branch
Loading
from geofabrik:v2-counters-long-long

Conversation

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.

zimmerle reacted with thumbs up emoji
...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.
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
Reviewers

@marcstern marcstern marcstern approved these changes

@zimmerle zimmerle Awaiting requested review from zimmerle

Labels
2.x Related to ModSecurity version 2.x enhancement pr available
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /