openalias: only consider TXT records, as DNS can return other records we did not ask for.
This commit is contained in:
@@ -148,6 +148,8 @@ class Contacts(dict, Logger):
|
|||||||
return None
|
return None
|
||||||
prefix = 'btc'
|
prefix = 'btc'
|
||||||
for record in records:
|
for record in records:
|
||||||
|
if record.rdtype != dns.rdatatype.TXT:
|
||||||
|
continue
|
||||||
string = to_string(record.strings[0], 'utf8')
|
string = to_string(record.strings[0], 'utf8')
|
||||||
if string.startswith('oa1:' + prefix):
|
if string.startswith('oa1:' + prefix):
|
||||||
address = cls.find_regex(string, r'recipient_address=([A-Za-z0-9]+)')
|
address = cls.find_regex(string, r'recipient_address=([A-Za-z0-9]+)')
|
||||||
|
|||||||
Reference in New Issue
Block a user