add extra validation for new domains
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -349,6 +349,8 @@ class Domains extends ApiCommand implements ResourceEntity
|
||||
|
||||
if (substr($p_domain, 0, 4) == 'xn--') {
|
||||
Response::standardError('domain_nopunycode', '', true);
|
||||
} elseif (Validate::validate_ip2($p_domain, true, '', true, true)) {
|
||||
Response::standardError('domain_noipaddress', '', true);
|
||||
}
|
||||
|
||||
$idna_convert = new IdnaWrapper();
|
||||
|
||||
@@ -224,7 +224,7 @@ class Validate
|
||||
* Check if the submitted string is a valid domainname
|
||||
*
|
||||
* @param string $domainname The domainname which should be checked.
|
||||
* @param bool $allow_underscore optional if true, allowes the underscore character in a domain label (DKIM etc.)
|
||||
* @param bool $allow_underscore optional if true, allows the underscore character in a domain label (DKIM etc.)
|
||||
*
|
||||
* @return string|boolean the domain-name if the domain is valid, false otherwise
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user