Open Habbie opened 6 years ago
(RecordTextReader::xfrText
and DNSPacketWriter::xfrText
should make sure the quoted strings are shorter than 256 bytes too (if lenField
is true); as the data is (should be for "unquoted text") stored in escaped form the check can only be done in DNSPacketWriter
I guess.appendSplit
in dnslabeltext.rl
autosplits content if it is too long)
Also it seems RecordTextReader::xfrText
has a rather strict requirement for quotes, i.e. it doesn't accept data which would be considered valid by RFC 1035 (although this seems to be on purpose).
If DNSPacketWriter::xfrText
gets an empty text it will always write a 0
byte, even is lenField == false
. This will trigger malformed packets with URI
and CAA
, e.g. foo 300 IN URI 1 2
.
Some notes:
1 2
is actually invalidI have some local changes to the CAA/URI code (really xfrText+xfrUnquotedText) but that suffers from this very correct existing comment in dnsparser.cc:
// exceptions thrown here do not result in logging in the main pdns auth server - just so you know!
... and is thus quite useless.
^ maybe just remove that feature?