Skip to content

Commit 36b62c1

Browse files
committed
fix: more strict regex
#8096 (comment)
1 parent e1cbee7 commit 36b62c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

repo/common/common.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import (
88
"github.com/google/uuid"
99
)
1010

11-
// Find dynamic map key names passed as Parent["foo"] notation
12-
var bracketsRe = regexp.MustCompile(`\[([^\[\]]*)\]`)
11+
// Find dynamic map key names passed with Parent["foo"] notation
12+
var bracketsRe = regexp.MustCompile(`\["([^\["\]]*)"\]`)
1313

1414
// Normalization for supporting arbitrary dynamic keys with dots:
1515
// Gateway.PublicGateways["gw.example.com"].UseSubdomains

0 commit comments

Comments
 (0)