diff --git a/CHANGELOG.md b/CHANGELOG.md index 4bd10d90..bc9b8803 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - **[dnsprovider]** pdns: notify secondary servers after updates ### Changed: + - **[dnsprovider]** allinkl: removed deprecated sha1 hashing - **[dnsprovider]** auroradns: update authentification - **[dnsprovider]** dnspod: deprecated. Use Tencent Cloud instead. diff --git a/providers/dns/duckdns/duckdns.go b/providers/dns/duckdns/duckdns.go index b684657b..a2f38542 100644 --- a/providers/dns/duckdns/duckdns.go +++ b/providers/dns/duckdns/duckdns.go @@ -79,13 +79,14 @@ func NewDNSProviderConfig(config *Config) (*DNSProvider, error) { // Present creates a TXT record to fulfill the dns-01 challenge. func (d *DNSProvider) Present(domain, token, keyAuth string) error { - _, txtRecord := dns01.GetRecord(domain, keyAuth) - return d.updateTxtRecord(domain, d.config.Token, txtRecord, false) + fqdn, txtRecord := dns01.GetRecord(domain, keyAuth) + return d.updateTxtRecord(dns01.UnFqdn(fqdn), d.config.Token, txtRecord, false) } // CleanUp clears DuckDNS TXT record. func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error { - return d.updateTxtRecord(domain, d.config.Token, "", true) + fqdn, _ := dns01.GetRecord(domain, keyAuth) + return d.updateTxtRecord(dns01.UnFqdn(fqdn), d.config.Token, "", true) } // Timeout returns the timeout and interval to use when checking for DNS propagation. diff --git a/providers/dns/duckdns/duckdns_test.go b/providers/dns/duckdns/duckdns_test.go index 36ec5a64..0fd291ab 100644 --- a/providers/dns/duckdns/duckdns_test.go +++ b/providers/dns/duckdns/duckdns_test.go @@ -107,32 +107,32 @@ func Test_getMainDomain(t *testing.T) { }, { desc: "explicit domain: sub domain", - domain: "sub.duckdns.org", + domain: "_acme-challenge.sub.duckdns.org", expected: "sub.duckdns.org", }, { desc: "explicit domain: subsub domain", - domain: "my.sub.duckdns.org", + domain: "_acme-challenge.my.sub.duckdns.org", expected: "sub.duckdns.org", }, { desc: "explicit domain: subsubsub domain", - domain: "my.sub.sub.duckdns.org", + domain: "_acme-challenge.my.sub.sub.duckdns.org", expected: "sub.duckdns.org", }, { desc: "only subname: sub domain", - domain: "sub", + domain: "_acme-challenge.sub", expected: "sub", }, { desc: "only subname: subsub domain", - domain: "my.sub", + domain: "_acme-challenge.my.sub", expected: "sub", }, { desc: "only subname: subsubsub domain", - domain: "my.sub.sub", + domain: "_acme-challenge.my.sub.sub", expected: "sub", }, }