Code review request, 8020842 IDN do not throw IAE when hostname ends with a trailing dot

Xuelei Fan Xuelei.Fan at Oracle.Com
Thu Aug 15 10:40:27 PDT 2013


On Aug 16, 2013, at 1:08, Mike Duigou <mike.duigou at oracle.com> wrote:

> I've been confused through this discussion as to why a trailing dot would be regarded as illegal.
> 
The discussion is too long to find the final decision easily.  A IDN with trailing dot should be regarded as legal IDN.  This update is trying to fix this.  For example, "." and "example.com." are legal IDN, and IDN.toASCII() should be return the legal name accordingly.

However, per the specification of Server Name Indication of TLS extension, a hostname should not end with trailing dot.  So in SNIHostName, we will check the return value of IDN.toASCII() to filter out hostnames with trailing dots.

This fix is trying to have IDN working with tailing dot and empty label correctly.   The previous code of SNIHostName will work as expected if IDN can handle trailing dot properly.

Thanks,
Xuelei

> Historically a trailing dot has been frequently (though not universally) used to denote a fully qualified domain name.
> 
> https://en.wikipedia.org/wiki/Fully_qualified_domain_name
> 
> Is this use now illegal/unsupported/invalid? Does having a trailing dot conflict with other parts of the IDN specification?
> 
> Mike
> 
> On Aug 13 2013, at 01:29 , Xuelei Fan wrote:
> 
>> Can I get an additional code review from networking team?
>> 
>> Thanks,
>> Xuelei
>> 
>> On 8/12/2013 2:07 PM, Weijun Wang wrote:
>>> new webrev: http://cr.openjdk.java.net/~xuelei/8020842/webrev.06/
> 



More information about the net-dev mailing list