Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TXT data should be treated as binary #28

Open
aeden opened this issue Nov 24, 2022 · 0 comments
Open

TXT data should be treated as binary #28

aeden opened this issue Nov 24, 2022 · 0 comments

Comments

@aeden
Copy link
Owner

aeden commented Nov 24, 2022

According to RFC 1035:

<character-string> is a single
length octet followed by that number of characters.  <character-string>
is treated as binary information, and can be up to 256 characters in
length (including the length octet).

and

<character-string> is expressed in one or two ways: as a contiguous set
of characters without interior spaces, or as a string beginning with a "
and ending with a ".  Inside a " delimited string any character can
occur, except for a " itself, which must be quoted using \ (back slash).

Therefore unquoted TXT data should be treated as the first contiguous character string of 1 to 255 characters following the TXT type declaration, and quoted TXT data should be treated as any contiguous character string of 1 to 255 characters, inside quotes.

At the moment unquoted TXT is limited to a regular expression that still includes many allowable characters, which should instead be changed to allow any non whitespace, however trying to make this change currently breaks the spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant