summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Halley <halley@dnspython.org>2005-09-02 05:23:14 +0000
committerBob Halley <halley@dnspython.org>2005-09-02 05:23:14 +0000
commit0865574e6da791d7360dd4a6f9d4267a1b81596d (patch)
tree2bab12209e22eab63a9e7d45ba9cf68298554edf
parente33c9d4bec6cddf4451364e82b8b82fd4244a0a3 (diff)
downloaddnspython-0865574e6da791d7360dd4a6f9d4267a1b81596d.tar.gz
disallow types-by-number in NSEC; update ChangeLog and README
Original author: Bob Halley <halley@dnspython.org> Date: 2004-07-31 21:32:06
-rw-r--r--ChangeLog13
-rw-r--r--README12
-rw-r--r--dns/rdtypes/ANY/NSEC.py5
3 files changed, 26 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 25036a1..14b81fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2004-07-31 Bob Halley <halley@dnspython.org>
+
+ * 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 <halley@dnspython.org>
* dns/rdtypes/ANY/LOC.py (LOC.from_text): LOC milliseconds values
diff --git a/README b/README
index 2fc4c60..691fac9 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 036b5e7..c4f1d2f 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: