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

InternetDomainName.isValid is not RFC1123 compliant #1872

Closed
gissuebot opened this issue Oct 31, 2014 · 2 comments
Closed

InternetDomainName.isValid is not RFC1123 compliant #1872

gissuebot opened this issue Oct 31, 2014 · 2 comments
Labels
package=net type=defect Bug, not working as expected

Comments

@gissuebot
Copy link

Original issue created by manderson23 on 2014-10-27 at 10:59 PM


InternetDomainName.isValid returns false for the parameter "8server".

RFC1123 suggests that names should be able to start with a digit. See https://groups.google.com/forum/#!topic/guava-discuss/8Sycya7Fkok on guava-discuss for a discussion of the issue.

I also asked for clarification on Server Fault at http://serverfault.com/questions/638260/is-it-valid-for-a-hostname-to-start-with-a-digit

My final suggestion on the mailing list for solving this was as follows:

"What about if the final part starts with a digit actually checking if the complete name is an IP address e.g. calling InetAddreses.isInetAddress? The discussion section in RFC 1123 does suggest a full syntactic check to prevent a dotted decimal number getting through."

but there was no response.

@cgdecker cgdecker removed the migrated label Nov 1, 2014
@kluever kluever added package=net type=defect Bug, not working as expected labels Nov 5, 2014
@tgpfeiffer
Copy link

I was directed here in a discussion of https://issues.cloudera.org/browse/DISTRO-638 ("Cannot install Cloudera Manager Agent if hostname starts with a digit") where the origin of that issue is that Docker generates hostnames as random hexadecimal strings, which do therefore quite often start with a digit. (And they refuse to change that, insisting that it is totally RFC-compliant to start with a digit, as long as there is also any normal letter in the hostname: moby/moby#7756, moby/moby#8194)

I would therefore very much like to see a change of behavior from "fail if first character of TLD is a digit" to "fail if all characters of TLD are digits".

@frank-dspeed
Copy link

tgpfeiffer there is a patch for that you can even patch it easy your self with simply adding a random letter fixed in front of the container name via editing docker src and making a fork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package=net type=defect Bug, not working as expected
Projects
None yet
Development

No branches or pull requests

6 participants