Skip to content

Commit

Permalink
Allow empty DNS record names (fix #314)
Browse files Browse the repository at this point in the history
  • Loading branch information
mholt committed Nov 5, 2024
1 parent c1f1d52 commit 4293198
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions solvers.go
Original file line number Diff line number Diff line change
Expand Up @@ -547,14 +547,15 @@ func (s *DNSManager) getDNSPresentMemory(dnsName, recType, value string) (dnsPre
defer s.recordsMu.Unlock()

var memory dnsPresentMemory
var found bool
for _, mem := range s.records[dnsName] {
if mem.zoneRec.record.Type == recType && mem.zoneRec.record.Value == value {
memory = mem
found = true
break
}
}

if memory.zoneRec.record.Name == "" {
if !found {
return dnsPresentMemory{}, fmt.Errorf("no memory of presenting a DNS record for %q (usually OK if presenting also failed)", dnsName)
}

Expand Down

0 comments on commit 4293198

Please sign in to comment.