dmachard / go-dnscollector

Ingesting, pipelining, and enhancing your DNS logs with usage indicators, security analysis, and additional metadata.
MIT License
205 stars 45 forks source link

double quote missing with invalid qname (\t, \n, ... in domain name) #753

Closed dmachard closed 3 months ago

dmachard commented 3 months ago

Describe the bug

Invalid log format in console, the double quote is missing .

024-06-24T18:29:22.517942283Z dnsdist CLIENT_QUERY NOERROR 192.168.1.16 59564 IPv4 UDP 36b www.apple   test.com A 0.000000
2024-06-24T18:29:22.540587193Z dnsdist CLIENT_RESPONSE NXDOMAIN 192.168.1.16 59564 IPv4 UDP 109b www.apple      test.com A 0.000000

To Reproduce

send dns resolution with the following qname: www.apple\ttest.com

Format ko with :

**Expected Result"

"www.apple test.com"