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

Domain name labels #28

Closed
richardschneider opened this issue Aug 30, 2018 · 2 comments
Closed

Domain name labels #28

richardschneider opened this issue Aug 30, 2018 · 2 comments

Comments

@richardschneider
Copy link
Owner

richardschneider commented Aug 30, 2018

The standard requires that domain name labels consist of only USASCII letters, digits or '-'. This is somewhat mitigated by Internationalized Domain Names .

WireFormat.ReadDomainName should throw InvalidDataExecption for characters outside this range. For the time being, WireFormat.WriteDomainName show throw InvalidArgumentException.

PresentationFormat is not affected, because it can be UNICODE.

From https://tools.ietf.org/html/rfc1035#section-2.3.1


<label> ::= <letter> [ [ <ldh-str> ] <let-dig> ]

<ldh-str> ::= <let-dig-hyp> | <let-dig-hyp> <ldh-str>

<let-dig-hyp> ::= <let-dig> | "-"

<let-dig> ::= <letter> | <digit>

<letter> ::= any one of the 52 alphabetic characters A through Z in
upper case and a through z in lower case

<digit> ::= any one of the ten digits 0 through 9

Note that while upper and lower case letters are allowed in domain
names, no significance is attached to the case.  That is, two names with
the same spelling but different case are to be treated as if identical.

The labels must follow the rules for ARPANET host names.  They must
start with a letter, end with a letter or digit, and have as interior
characters only letters, digits, and hyphen.  There are also some
restrictions on the length.  Labels must be 63 characters or less.
@richardschneider
Copy link
Owner Author

Domain labels now allow escaping.

@richardschneider
Copy link
Owner Author

It's been observed catalyst-network/Catalyst#630 that Apple uses UTF8 in domain names.

Change the domain name reader/writer to use UTF8 and not ASCII.

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