From: Bob Halley Date: Fri, 2 Sep 2005 05:23:14 +0000 (+0000) Subject: disallow types-by-number in NSEC; update ChangeLog and README X-Git-Tag: v1.3.4~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0865574e6da791d7360dd4a6f9d4267a1b81596d;p=thirdparty%2Fdnspython.git disallow types-by-number in NSEC; update ChangeLog and README Original author: Bob Halley Date: 2004-07-31 21:32:06 --- diff --git a/ChangeLog b/ChangeLog index 25036a1f..14b81fa3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2004-07-31 Bob Halley + + * dns/rdtypes/ANY/NSEC.py (NSEC.from_text): The NSEC text format + does not allow specifying types by number, so we shouldn't either. + + * dns/renderer.py: the renderer module didn't import random, + causing an exception to be raised if a query id wasn't provided + when a Renderer was created. + + * dns/resolver.py (Resolver.query): the resolver wasn't catching + dns.exception.Timeout, so a timeout erroneously caused the whole + resolution to fail instead of just going on to the next server. + 2004-06-16 Bob Halley * dns/rdtypes/ANY/LOC.py (LOC.from_text): LOC milliseconds values diff --git a/README b/README index 2fc4c601..691fac9c 100644 --- a/README +++ b/README @@ -26,6 +26,18 @@ This is dnspython 1.3.2. New since 1.3.1: + The NSEC format doesn't allow specifying types by number, so + we shouldn't either. (Using the unknown type format is still + OK though.) + + The resolver wasn't catching dns.exception.Timeout, so a timeout + erroneously caused the whole resolution to fail instead of just + going on to the next server. + + The renderer module didn't import random, causing an exception + to be raised if a query id wasn't provided when a Renderer was + created. + The conversion of LOC milliseconds values from text to binary was incorrect if the length of the milliseconds string was not 3. diff --git a/dns/rdtypes/ANY/NSEC.py b/dns/rdtypes/ANY/NSEC.py index 036b5e7d..c4f1d2f6 100644 --- a/dns/rdtypes/ANY/NSEC.py +++ b/dns/rdtypes/ANY/NSEC.py @@ -57,10 +57,7 @@ class NSEC(dns.rdata.Rdata): (ttype, value) = tok.get() if ttype == dns.tokenizer.EOL or ttype == dns.tokenizer.EOF: break - if value.isdigit(): - nrdtype = int(value) - else: - nrdtype = dns.rdatatype.from_text(value) + nrdtype = dns.rdatatype.from_text(value) if nrdtype == 0: raise dns.exception.SyntaxError, "NSEC with bit 0" if nrdtype > 65535: