Skip to content

Commit

Permalink
Allow colons in policy name
Browse files Browse the repository at this point in the history
Allows the use of colons in the name of a policy
  • Loading branch information
sdejong629 committed Aug 4, 2023
1 parent acb269f commit 4bab353
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions minio/resource_minio_iam_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ func validateIAMNamePolicy(v interface{}, k string) (ws []string, errors []error
"%q cannot be longer than 96 characters, name is limited to 128", k))
}

if !regexp.MustCompile(`^[\w+=,.@-]*$`).MatchString(value) {
if !regexp.MustCompile(`^[\w+=,.@-:]*$`).MatchString(value) {

Check failure on line 140 in minio/resource_minio_iam_policy.go

View workflow job for this annotation

GitHub Actions / Checkup

error parsing regexp: invalid character class range: `@-:` (SA1000)
errors = append(errors, fmt.Errorf(
"%q must match [\\w+=,.@-]", k))
"%q must match [\\w+=,.@-:]", k))
}
return
}
Expand Down

0 comments on commit 4bab353

Please sign in to comment.