Skip to content

Commit 812b5f8

Browse files
committed
don't allow comma separated rules
1 parent bd82e3d commit 812b5f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rulesengine/rules.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ func parseAllowRule(ruleStr string) (Rule, error) {
116116
return Rule{}, fmt.Errorf("unknown key: %s", key)
117117
}
118118

119-
// Skip whitespace or comma separators
120-
for rest != "" && (rest[0] == ' ' || rest[0] == '\t' || rest[0] == ',') {
119+
// Skip whitespace separators (only support mac and linux so \r\n shouldn't be a thing)
120+
for rest != "" && (rest[0] == ' ' || rest[0] == '\t' || rest[0] == '\n') {
121121
rest = rest[1:]
122122
}
123123
}

0 commit comments

Comments
 (0)