Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

Commit

Permalink
fix: widened AltNames names rules
Browse files Browse the repository at this point in the history
Added wildcard domains and dashes in domains
  • Loading branch information
siredmar committed Oct 10, 2022
1 parent 45c0f6e commit 758edf0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/certretrieval/certretrieval.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (c Config) Validate() error {
}

if c.AltNames != "" {
r := regexp.MustCompile(`^(\w+\.*)(,*\w+\.*)*$`)
r := regexp.MustCompile(`^([\w+\.\*-]+)(,[\w+\.\*-]+)*$`)
if !r.MatchString(c.AltNames) {
errors = append(errors, fmt.Errorf("AltNames must be a comma separated list of DNS names"))
}
Expand Down

0 comments on commit 758edf0

Please sign in to comment.