stream-dns icon indicating copy to clipboard operation
stream-dns copied to clipboard

Check format of TXT record and send them in the correct format

Open NotBad4U opened this issue 6 years ago • 0 comments

TXT record

TXT records hold free form text of any type. TXT records historically have also been used to contain human-readable information about a server, network, data center, and other accounting information.

Overview

The text in TXT record must be enclosed in quotes. Multiple quoted strings may appear on a single line or parentheses may be used to contain them if they appear on multiple lines. In both cases, the enclosed text (eliminating the quotes) is concatenated (joined) with no intervening characters added.

Example:

; multiple quotes strings on a single line
test.intern        IN      TXT    "Located in a black hole" " somewhere"

; multiple quoted strings on multiple lines
test.intern        IN      TXT    ("Located in a black hole" 
                           " somewhere over the rainbow")

What to do

  • Check the format in the consumer after the unmarshal of the record
  • Reject and log and push an error on sentry if the record doesn't have a correct format
  • When we return the result, we must enclose the content in quotes.

NotBad4U avatar Aug 07 '19 10:08 NotBad4U