Closed mzpqnxow closed 4 years ago
Hi,
I would prefer massdns to escape the name in the JSON output properly in order to allow illegal queries and responses. This could come in handy for research purposes. At the moment, other types of illegal payloads are not encoded properly either (see https://github.com/blechschmidt/massdns/issues/43). If you want to provide a PR, I am happy to merge it.
I overhauled the NDJSON output. The issue should have been fixed by https://github.com/blechschmidt/massdns/commit/6b74007bae6ebeb3025b288dd091120a0f2d109a.
Thanks! I will give it a shot on one of my datasets, I believe the other issue was with a \
which by the looks of the commit I believe is handled properly now (by escaping it)
Will let you know if any issues persist
Hi @blechschmidt
I was recently performing some testing and didn't realize that my input list had some illegal DNS names in it. Specifically, one of the domains to be queried contained a double quote.
As expected, there was no A record for this name. However, the SOA record was logged and the double quote was not escaped inside the JSON line, causes JSON parsers to choke.
I realize that this was an illegal query, but there should probably be a better way of handling this, either at input time or output time
If you prefer one of these (or none) I am happy to provide a simple PR, please let me know! Thanks