From dedb08b75903efeafc983ee923245af1c37f3e44 Mon Sep 17 00:00:00 2001 From: Kishi85 Date: Fri, 15 Feb 2019 13:44:12 +0100 Subject: [PATCH] dns.nsupdate: correctly delete a specific TXT value from DNS --- modes/dns/nsupdate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modes/dns/nsupdate.py b/modes/dns/nsupdate.py index 1e594be..336e11d 100644 --- a/modes/dns/nsupdate.py +++ b/modes/dns/nsupdate.py @@ -150,6 +150,6 @@ class ChallengeHandler(DNSChallengeHandler): def remove_dns_record(self, domain, txtvalue): zone, nameserverip = self._determine_zone_and_nameserverip(domain) update = dns.update.Update(zone, keyring=self.keyring, keyalgorithm=self.keyalgorithm) - update.delete(domain, 'TXT', txtvalue) + update.delete(domain, dns.rdata.from_text(dns.rdataclass.IN, dns.rdatatype.TXT, txtvalue)) print('Deleting \'{} 60 IN TXT "{}"\' from {}'.format(domain, txtvalue, nameserverip)) dns.query.tcp(update, nameserverip)