Add support for EAI addresses in domains and selectors (John Levine)
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
UNRELEASED Version 0.9.0
|
UNRELEASED Version 0.9.0
|
||||||
|
- Add support for EAI addresses in domains and selectors (John Levine)
|
||||||
- Add type Hinting for sign and verify functions (LP: #1782596)
|
- Add type Hinting for sign and verify functions (LP: #1782596)
|
||||||
(Thomas Ward)
|
(Thomas Ward)
|
||||||
- PEP8 Blank Lines Style Issues (LP: #1782596)
|
- PEP8 Blank Lines Style Issues (LP: #1782596)
|
||||||
|
|||||||
+2
-2
@@ -53,7 +53,7 @@ def get_txt_Milter_dns(name):
|
|||||||
if name.endswith('.'):
|
if name.endswith('.'):
|
||||||
name = name[:-1]
|
name = name[:-1]
|
||||||
sess = Session()
|
sess = Session()
|
||||||
a = sess.dns(name,'TXT')
|
a = sess.dns(name.encode('idna'),'TXT')
|
||||||
if a: return b''.join(a[0])
|
if a: return b''.join(a[0])
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@@ -79,7 +79,7 @@ def get_txt(name):
|
|||||||
"""
|
"""
|
||||||
# pydns needs Unicode, but DKIM's d= is ASCII (already punycoded).
|
# pydns needs Unicode, but DKIM's d= is ASCII (already punycoded).
|
||||||
try:
|
try:
|
||||||
unicode_name = name.decode('ascii')
|
unicode_name = name.decode('UTF-8')
|
||||||
except UnicodeDecodeError:
|
except UnicodeDecodeError:
|
||||||
return None
|
return None
|
||||||
txt = _get_txt(unicode_name)
|
txt = _get_txt(unicode_name)
|
||||||
|
|||||||
Reference in New Issue
Block a user