Skip to content

Commit

Permalink
fix: @ char is valid for AWS ARNs (#1258)
Browse files Browse the repository at this point in the history
  • Loading branch information
tommartensen committed Apr 12, 2024
1 parent 6e0308a commit c1f8547
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/infractl/cluster/utils/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func ValidateParameterArgument(parts []string) error {
if value == "" {
return errors.New("value is empty")
}
match, err = regexp.MatchString(`^[a-zA-Z0-9:\/\?._-]+$`, value)
match, err = regexp.MatchString(`^[a-zA-Z0-9:\/\?._@-]+$`, value)
if err != nil {
return err
}
Expand Down
3 changes: 3 additions & 0 deletions cmd/infractl/cluster/utils/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ func TestValidateParameterArgument(t *testing.T) {

err = ValidateParameterArgument([]string{"container-type", "container_d"})
assert.NoError(t, err, "no error expected")

err = ValidateParameterArgument([]string{"user-arns", "arn:aws:iam::393282794030:user/[email protected]"})
assert.NoError(t, err, "no error expected")
}

0 comments on commit c1f8547

Please sign in to comment.