rthalley / dnspython

a powerful DNS toolkit for python
http://www.dnspython.org
Other
2.44k stars 517 forks source link

TXT from_wire() permits an empty list (zero rdlen) #1117

Closed rthalley closed 2 months ago

rthalley commented 2 months ago

Describe the bug RFC 1035 says that a TXT record has one or more character strings. Dnspython enforces this when working with zonefile format, but does not check that the list of strings is non-empty when reading wire format or if the TXT constructor is invoked directly.

To Reproduce

dns.rdata.from_wire(dns.rdataclass.IN, dns.rdatatype.TXT, b"", 0, 0)
rthalley commented 2 months ago

Fixed.