From d891600a89931cbb2a11bd63cc5a673663d6fc10 Mon Sep 17 00:00:00 2001 From: Daniil Rutskiy <10889589+dstdfx@users.noreply.github.com> Date: Thu, 14 Feb 2019 15:35:49 +0100 Subject: [PATCH] fix: TXT records clean up for Vscale DNS provider (#798) --- providers/dns/vscale/vscale.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/providers/dns/vscale/vscale.go b/providers/dns/vscale/vscale.go index 69060be3..58690421 100644 --- a/providers/dns/vscale/vscale.go +++ b/providers/dns/vscale/vscale.go @@ -128,6 +128,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 { @@ -142,7 +143,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("vscale: %v", err)