migrator / guava-libraries-2

Guava: Google Core Libraries for Java 1.6+
0 stars 0 forks source link

InternetDomainName.isValid is not RFC1123 compliant #33

Open migrator opened 9 years ago

migrator commented 9 years ago

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.

relevance: 1