1
0
mirror of https://github.com/fumiama/terasu-cloudflared.git synced 2026-06-11 05:30:30 +08:00

vuln: Fix GO-2025-3770 vulnerability

This commit is contained in:
João "Pisco" Fernandes
2025-08-07 12:34:45 +01:00
parent 1cedefa1c2
commit 6c3df26b3c
13 changed files with 148 additions and 48 deletions

View File

@@ -730,11 +730,9 @@ func patNextSegment(pattern string) (nodeTyp, string, string, byte, int, int) {
tail = pattern[pe]
}
var rexpat string
if idx := strings.Index(key, ":"); idx >= 0 {
key, rexpat, isRegexp := strings.Cut(key, ":")
if isRegexp {
nt = ntRegexp
rexpat = key[idx+1:]
key = key[:idx]
}
if len(rexpat) > 0 {