mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 10:50:44 +00:00
cmd/devp2p: use isSubdomain for Cloudflare DNS record filtering
Replace strings.HasSuffix with isSubdomain when matching existing TXT records, avoiding false positives on zone names that share a suffix.
This commit is contained in:
parent
aa3d286f54
commit
a8bdc9e39a
1 changed files with 1 additions and 1 deletions
|
|
@ -121,7 +121,7 @@ func (c *cloudflareClient) uploadRecords(name string, records map[string]string)
|
|||
}
|
||||
existing := make(map[string]cloudflare.DNSRecord)
|
||||
for _, entry := range entries {
|
||||
if !strings.HasSuffix(entry.Name, name) {
|
||||
if !isSubdomain(entry.Name, name) {
|
||||
continue
|
||||
}
|
||||
existing[strings.ToLower(entry.Name)] = entry
|
||||
|
|
|
|||
Loading…
Reference in a new issue