Fix: Remove regex pattern length restriction (#2087)

In this PR I removed the regex pattern length restriction because from
multi value variables this length can be easly reached, also if the
regex is going to be too long it will be caught in the timeout.

Fixes #2086
This commit is contained in:
Zoltán Bedi
2025-09-23 11:51:31 +02:00
committed by GitHub
parent e559459a96
commit 5db35450a2
3 changed files with 5 additions and 13 deletions

View File

@@ -155,11 +155,6 @@ func parseFilter(filter string) (*regexp2.Regexp, error) {
return nil, backend.DownstreamErrorf("error parsing regexp: potentially dangerous regex pattern detected")
}
// Security: Limit regex pattern length
if len(regexPattern) > 1000 {
return nil, backend.DownstreamErrorf("error parsing regexp: pattern too long (max 1000 characters)")
}
pattern := ""
if matches[2] != "" {
if flagRE.MatchString(matches[2]) {