return financial.contains(suffix);
}
- public static void checkCertifiableDomain(String domain, boolean hasPunycodeRight) throws GigiApiException {
+ public static void checkCertifiableDomain(String domain, boolean hasPunycodeRight, boolean asRegister) throws GigiApiException {
if (isHighFinancialValue(domain)) {
throw new GigiApiException("Domain blocked for automatic adding.");
}
if (parts.length < 2) {
throw new GigiApiException("Domain does not contain '.'.");
}
+
boolean neededPunycode = false;
for (int i = parts.length - 1; i >= 0; i--) {
if ( !isValidDomainPart(parts[i])) {
throw new GigiApiException("Punycode not allowed under this TLD.");
}
- String publicSuffix = PublicSuffixes.getInstance().getRegistrablePart(domain);
- if ( !domain.equals(publicSuffix)) {
- throw new GigiApiException("You may only register a domain with exactly one label before the public suffix.");
+ if (asRegister) {
+ String publicSuffix = PublicSuffixes.getInstance().getRegistrablePart(domain);
+ if ( !domain.equals(publicSuffix)) {
+ throw new GigiApiException("You may only register a domain with exactly one label before the public suffix.");
+ }
}
if (("." + domain).matches("(\\.[0-9]*)*")) {