equal
deleted
inserted
replaced
673 } |
673 } |
674 } |
674 } |
675 |
675 |
676 private transient String cdomain, hdomain; |
676 private transient String cdomain, hdomain; |
677 |
677 |
|
678 /** |
|
679 * previously we allowed domain names to be specified in IDN ACE form |
|
680 * Need to check for that and convert to Unicode |
|
681 */ |
|
682 private static String checkForIDN(String name) { |
|
683 if (name.startsWith("xn--") || name.contains(".xn--")) { |
|
684 return IDN.toUnicode(name); |
|
685 } else { |
|
686 return name; |
|
687 } |
|
688 } |
|
689 |
678 private boolean match(String cname, String hname) { |
690 private boolean match(String cname, String hname) { |
679 String a = cname.toLowerCase(); |
691 String a = checkForIDN(cname.toLowerCase()); |
680 String b = hname.toLowerCase(); |
692 String b = checkForIDN(hname.toLowerCase()); |
681 if (a.startsWith(b) && |
693 if (a.startsWith(b) && |
682 ((a.length() == b.length()) || (a.charAt(b.length()) == '.'))) { |
694 ((a.length() == b.length()) || (a.charAt(b.length()) == '.'))) { |
683 return true; |
695 return true; |
684 } |
696 } |
685 if (cdomain == null) { |
697 if (cdomain == null) { |