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

Enforce quantifier limit #44

Merged
merged 6 commits into from May 15, 2024
Merged

Enforce quantifier limit #44

merged 6 commits into from May 15, 2024

Conversation

fuchsnj
Copy link
Contributor

@fuchsnj fuchsnj commented May 8, 2024

Jira

This adds a reasonably large limit to the lower bound of quantifiers. When a regex is compiled into a DFA the size of the graph used for repetition is roughly proportional with size of the quantifier used. We already have "complexity" limits which validates a regex based on the overall DFA size generated, but having a hard cap for the quantifier values can make it easier for users to understand the limits.

This does not affect unbounded quantifiers (e.g. .{5,} or .+).

@fuchsnj fuchsnj changed the title Enforce quantifier lower bound limit Enforce quantifier limit May 8, 2024
@fuchsnj fuchsnj merged commit d6996a9 into main May 15, 2024
4 checks passed
@fuchsnj fuchsnj deleted the fuchsnj/quantifier_validation branch May 15, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants