isValidHostname is gone
This commit is contained in:
@@ -733,7 +733,8 @@ function validateServerAddress(serverAddress) {
|
||||
|
||||
// workaround https://github.com/oncletom/tld.js/issues/73
|
||||
const tmp = serverAddress.replace('_', '-');
|
||||
if (!tld.isValidHostname(tmp)) return new BoxError(BoxError.BAD_FIELD, 'serverAddress is not a valid hostname');
|
||||
if (!tld.isValid(tmp)) return new BoxError(BoxError.BAD_FIELD, 'Hostname is not a valid domain name');
|
||||
if (tmp.length > 253) return new BoxError(BoxError.BAD_FIELD, 'Hostname length exceeds 253 characters');
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user