1
0

openalias: only consider TXT records, as DNS can return other records we did not ask for.

This commit is contained in:
Sander van Grieken
2024-10-08 11:57:23 +02:00
parent f471356278
commit db865f6f72

View File

@@ -148,6 +148,8 @@ class Contacts(dict, Logger):
return None
prefix = 'btc'
for record in records:
if record.rdtype != dns.rdatatype.TXT:
continue
string = to_string(record.strings[0], 'utf8')
if string.startswith('oa1:' + prefix):
address = cls.find_regex(string, r'recipient_address=([A-Za-z0-9]+)')