From 938ba435d666ec16e83d211ae3f5c2181271bfda Mon Sep 17 00:00:00 2001 From: Daniil Rutskiy <10889589+dstdfx@users.noreply.github.com> Date: Thu, 14 Feb 2019 15:30:03 +0100 Subject: [PATCH] fix: TXT records clean up for Selectel DNS provider (#797) --- providers/dns/selectel/selectel.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/providers/dns/selectel/selectel.go b/providers/dns/selectel/selectel.go index f1e23965..80f4ca74 100644 --- a/providers/dns/selectel/selectel.go +++ b/providers/dns/selectel/selectel.go @@ -127,6 +127,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error { // CleanUp removes a TXT record used for DNS-01 challenge. func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error { fqdn, _ := dns01.GetRecord(domain, keyAuth) + recordName := dns01.UnFqdn(fqdn) domainObj, err := d.client.GetDomainByName(domain) if err != nil { @@ -141,7 +142,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error { // Delete records with specific FQDN var lastErr error for _, record := range records { - if record.Name == fqdn { + if record.Name == recordName { err = d.client.DeleteRecord(domainObj.ID, record.ID) if err != nil { lastErr = fmt.Errorf("selectel: %v", err)