Revert "Make is_valid_domain_name more strict"
This commit is contained in:
parent
1207c6e865
commit
fe38275cb5
@ -709,14 +709,14 @@ function user_get_alias_details($username) {
|
|||||||
}
|
}
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
function is_valid_domain_name($domain_name) {
|
function is_valid_domain_name($domain_name) {
|
||||||
if (empty($domain_name)) {
|
if (empty($domain_name)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$domain_name = idn_to_ascii($domain_name, 0, INTL_IDNA_VARIANT_UTS46);
|
$domain_name = idn_to_ascii($domain_name, 0, INTL_IDNA_VARIANT_UTS46);
|
||||||
return (preg_match("/^([a-z\d](-*[a-z\d])*)\.(([a-z\d](-*[a-z\d])*))*$/i", $domain_name)
|
return (preg_match("/^([a-z\d](-*[a-z\d])*)(\.([a-z\d](-*[a-z\d])*))*$/i", $domain_name)
|
||||||
&& preg_match("/^.{1,253}$/", $domain_name)
|
&& preg_match("/^.{1,253}$/", $domain_name)
|
||||||
&& preg_match("/^[^\.]{1,63}\.([^\.]{1,63})*$/", $domain_name));
|
&& preg_match("/^[^\.]{1,63}(\.[^\.]{1,63})*$/", $domain_name));
|
||||||
}
|
}
|
||||||
function set_tfa($_data) {
|
function set_tfa($_data) {
|
||||||
global $lang;
|
global $lang;
|
||||||
|
Loading…
Reference in New Issue
Block a user