rejected TXT records where a value was not quoted.
Original author: Bob Halley <halley@dnspython.org>
Date: 2004-10-26 00:13:21
+2004-10-25 Bob Halley <halley@dnspython.org>
+
+ * dns/rdtypes/ANY/TXT.py (TXT.from_text): The masterfile parser
+ incorrectly rejected TXT records where a value was not quoted.
+
2004-10-11 Bob Halley <halley@dnspython.org>
* dns/message.py: Added make_response(), which creates a skeletal
(ttype, s) = tok.get()
if ttype == dns.tokenizer.EOL or ttype == dns.tokenizer.EOF:
break
- if ttype != dns.tokenizer.QUOTED_STRING:
- raise dns.exception.SyntaxError, "expected a quoted string"
+ if ttype != dns.tokenizer.QUOTED_STRING and \
+ ttype != dns.tokenizer.IDENTIFIER:
+ raise dns.exception.SyntaxError, "expected a string"
if len(s) > 255:
raise dns.exception.SyntaxError, "string too long"
strings.append(s)
txt10 TXT "foo bar"
txt11 TXT "\"foo\""
txt12 TXT "\"foo\""
+txt13 TXT foo
$TTL 300 ; 5 minutes
u TXT "txt-not-in-nxt"
$ORIGIN u.example.
txt10 3600 IN TXT "foo bar"
txt11 3600 IN TXT "\"foo\""
txt12 3600 IN TXT "\"foo\""
+txt13 3600 IN TXT "foo"
u 300 IN TXT "txt-not-in-nxt"
a.u 300 IN A 73.80.65.49
b.u 300 IN A 73.80.65.49
txt10.example. 3600 IN TXT "foo bar"
txt11.example. 3600 IN TXT "\"foo\""
txt12.example. 3600 IN TXT "\"foo\""
+txt13.example. 3600 IN TXT "foo"
u.example. 300 IN TXT "txt-not-in-nxt"
a.u.example. 300 IN A 73.80.65.49
b.u.example. 300 IN A 73.80.65.49