News for hackers. Stuff that matters.
Re:The danger of the trailing dot in the domain name by derefr on Saturday March 16, 2013 @05:09AM (#5384919)
Well, for the purposes of SSL verification, or any of these other tests, "localhost" and "localhost." are two very different machines--one is "your" localhost, while the other is "the" localhost [theoretically, the A record for a TLD called "localhost"]. Same with "foo.local" and "foo.local."

Any non-rooted domain actually has the potential to have what is called a "search domain" applied to it: if your own host's FQDN is bob.example.com, going to "foo.com" can actually take you to "foo.com.example.com.", just like going to "foo" can take you to "foo.example.com."

It's just that, conventionally, although it was always an option to use weird TLD-lookin' subdomain hierarchies within domains like that, nobody does it, because it's so confusing. I don't think much at all would break if we enforced a "if your non-rooted domain ends in a known TLD, canonicalize it to a rooted domain before comparison" rule in browsers, the OpenSSL and OpenSSH libraries, etc., and then require that going forward, all X.509 certs, CORS policies, and so forth which are meant to refer to an FQDN are issued only for the rooted version.

[If you're curious, DNS zone records themselves are always already canonicalized into rooted form whenever you edit them through any sensible interface.]

Re:The danger of the trailing dot in the domain name by __david__ on Saturday March 16, 2013 @05:54AM (#5384987)
> "localhost" and "localhost." are two very different machines--one is "your" localhost, while the other is "the" localhost

I don't think this is correct. Check out RFC 2606--it implies that .localhost (the TLD) is localhost, which means "localhost" and "localhost." are the same (one will definitely not have a search domain added to it though).

I suspect the same applies to .local—I just checked and the multicast DNS draft RFC [1] refers to ".local." everywhere.

[1] https://tools.ietf.org/html/draft-cheshire-dnsext-multicastd...

Re:The danger of the trailing dot in the domain name by derefr on Saturday March 16, 2013 @06:09AM (#5385002)
Hrm, you're right--that's what I get for using any specific examples :)

Any other TLD--besides the special-cased "private virtual" ones (localhost., local.)--will still have this problem, though.