I don't really understand the reason for the restriction in SNIHostName
But, I guess that is where it should be enforced if it is required.

Michael.

On 06/08/13 17:43, Dmitry Samersoff wrote:
Xuelei,

. (dot) is perfectly valid domain name and it means root domain so com.
is valid domain name as well.

It thinks to me that in context of methods your change we should ignore
trailing dots, rather than throw exception.

-Dmitry



On 2013-08-06 15:44, Xuelei Fan wrote:
Hi,

Please review the bug fix to strict the illegal input checking in IDN.

webrev: http://cr.openjdk.java.net./~xuelei/8020842/webrev.00/

Here is two test cases, which are expected to get IAE.

Case 1:
String host = IDN.toASCII(".", IDN.USE_STD3_ASCII_RULES);
Exception in thread "main" java.lang.StringIndexOutOfBoundsException:
String index out of range: 0
         at java.lang.StringBuffer.charAt(StringBuffer.java:204)
         at java.net.IDN.toASCIIInternal(IDN.java:279)
         at java.net.IDN.toASCII(IDN.java:118)

Case 2:
String host = IDN.toASCII("com.", IDN.USE_STD3_ASCII_RULES);

Thanks,
Xuelei



Reply via email to