refactor: create 941170 .ra file#4493
Merged
Merged
Conversation
Contributor
|
📊 Quantitative test results for language: |
25 tasks
Member
Author
|
blocked by coreruleset/crs-toolchain#290 — the toolchain expands |
Member
|
@fzipi Have the blockers been resolved for this PR, can you pick it up and fix the tests? I'll try and get this merged. |
Member
Author
|
I'll take a look tomorrow. |
fzipi
force-pushed
the
regex-assembly/941170
branch
from
May 10, 2026 23:38
af2da18 to
951166f
Compare
Contributor
|
📊 Quantitative test results for language: |
replace [\s\S] with . in the .ra so crs-toolchain can generate a
PCRE-compatible pattern; [\s\S] expanded to [\x00-\x{10ffff}], which
fails toolchain validation and PCRE 8-bit compilation. . is
dotall-equivalent under modsec2-apache and modsec3-nginx (verified:
. matches newlines in both engines).
also revert the moz-binding branch quantifier [^-]*?- back to \W*?-,
the PCRE backtracking regression introduced in #2292 (see #4633), and
add test 6 covering the moz-binding branch, which had no coverage.
fzipi
force-pushed
the
regex-assembly/941170
branch
from
June 2, 2026 11:05
f4c8ef9 to
377e388
Compare
theseion
requested changes
Jun 2, 2026
Co-authored-by: Max Leske <[email protected]>
theseion
approved these changes
Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
.instead of[\s\S]in the.raso the toolchain generates a PCRE-compatible pattern[^-]*?-back to\W*?-(perf fix for perf: rule 941170 moz-binding branch regex slower than v3.3 (1.4–2.5× PCRE regression) #4633)why
.rafiles make patterns easier to review and update[\s\S]expands to[\x00-\x{10ffff}], which fails toolchain validation (crs-toolchain#300) and PCRE 8-bit compilation in modsec2-apache..is dotall-equivalent in our engines: verified.matches newlines on both modsec2-apache and modsec3-nginx via direct payload probe[^-]*?-quantifier causes PCRE backtracking on benign inputs (1.4–2.5x regression, introduced in fix 941170 #2292) — see perf: rule 941170 moz-binding branch regex slower than v3.3 (1.4–2.5× PCRE regression) #4633refs
[\s\S]instead of expanding to[\x00-\x{10ffff}]for PCRE compatibility crs-toolchain#291ai disclosure
[\s\S]→.conversion across the.ra, applying the moz-binding perf revert, drafting the moz-binding regression test, regenerating via crs-toolchain, this PR description.matches newlines (dotall) on both engines via direct payload probe, confirmedcrs-toolchain regex generate/compareoutput, verified the generated rule contains no[\x00-\x{10ffff}]wide escapes