Closed miekg closed 4 months ago
testing in my tree, yields:
--- FAIL: TestUpdate2NoRdataUnpack (0.00s)
update2_test.go:72: failed to unpack RR with zero rdata: SOA: dns: overflow unpacking uint32
update2_test.go:72: failed to unpack RR with zero rdata: TSIG: dns: overflow unpacking uint16
update2_test.go:72: failed to unpack RR with zero rdata: TKEY: dns: overflow unpacking uint16
FAIL
I've applied this to our DNS API repository which has a fairly extensive test suite, and everything looks good!
Should still be done in packDomainName as well.
Maybe also on the lexer level so that . 1 IN TXT hello\
is also rejected? (I'd be happy to work on a PR for that, but it might take another two weeks or so.)
yes, please do. I've merged this for now, but there is indeed some followup work to be done
Keep track if the escape, if still true when returning isDomainName should return false.
TODO:
There are multiple other places that supposedly also check for this, but they are not called in the parsing.
Fixes: #1528
Signed-off-by: Miek Gieben miek@miek.nl