Skip to content

Commit

Permalink
Simplify trimming *. prefix of domain in acme dns validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
dopey committed Dec 20, 2019
1 parent 37d3396 commit 967e86a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions acme/challenge.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,7 @@ func (dc *dns01Challenge) validate(db nosql.DB, jwk *jose.JSONWebKey, vo validat
// This is done to avoid making TXT lookups for domains like
// _acme-challenge.*.example.com
// Instead perform txt lookup for _acme-challenge.example.com
domain := dc.Value
if strings.HasPrefix(domain, "*") {
domain = strings.TrimPrefix(domain, "*.")
}
domain := strings.TrimPrefix(dc.Value, "*.")

txtRecords, err := vo.lookupTxt("_acme-challenge." + domain)
if err != nil {
Expand Down

0 comments on commit 967e86a

Please sign in to comment.