You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When DNSLookup_dnspython() is called with qtype option including lowercase letter, empty list is always returned as if there's no record, regardless of the actual server response.
dnspython accepts both upper/lowercase rdtype and internally normalizes to uppercase.
I suppose letting DNSLookup_dnspython() behave alike would be the best fix.
This one-line patch works well in my environment:
--- a/spf.py
+++ b/spf.py
@@ -120,6 +120,7 @@ def DNSLookup_pydns(name, qtype, strict=True, timeout=20):
def DNSLookup_dnspython(name, qtype, tcpfallback=True, timeout=30):
retVal = []
try:
+ qtype = qtype.upper()
# FIXME: how to disable TCP fallback in dnspython if not tcpfallback?
dns_version = dns.version.MAJOR+dns.version.MINOR/100
if dns_version<1.16:
Thanks.
The text was updated successfully, but these errors were encountered:
You are calling the DNSLookup api to allow your app to work with any of several libraries (like pyspf does)? In that case, maybe I should split off "anydns" to provide just that unified/simplified API, and require that in pyspf.
Ah, no, I've just found this issue when debugging spf-engine, which doesn't work correctly in dnspython-enabled environment because of the way it calls DNSLookup:
Hi,
When
DNSLookup_dnspython()
is called withqtype
option including lowercase letter, empty list is always returned as if there's no record, regardless of the actual server response.dnspython
accepts both upper/lowercaserdtype
and internally normalizes to uppercase.I suppose letting
DNSLookup_dnspython()
behave alike would be the best fix.This one-line patch works well in my environment:
Thanks.
The text was updated successfully, but these errors were encountered: