Skip to content

Commit

Permalink
add defensive line to prevent potential forever loop
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahalsmiller committed Nov 7, 2024
1 parent b34f610 commit 31de425
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions acl/policy_ce.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ func cleanDuplicates(rules string, err error) string {
if len(keysubmatch) > 0 {
//found a match
match = keysubmatch[0][0]
} else {
//no match found, return error up to caller
return rules
}
//replace the captured block 1 time to preserve the other instance of the key, then check the cleaned string
//for duplicate key errors
Expand Down

0 comments on commit 31de425

Please sign in to comment.