mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2025-10-03 00:02:53 -04:00
[Web] Revert - allow "*" as wildcard domain
This commit is contained in:
parent
f2c4697ca3
commit
28985973eb
@ -1116,14 +1116,10 @@ function is_valid_domain_name($domain_name, $options = array()) {
|
||||
$domain_name = idn_to_ascii($domain_name, 0, INTL_IDNA_VARIANT_UTS46);
|
||||
|
||||
if (isset($options['allow_wildcard']) && $options['allow_wildcard'] == true) {
|
||||
// Remove '*.' if wildcard domains are allowed
|
||||
// Remove '*.' if wildcard subdomains are allowed
|
||||
if (strpos($domain_name, '*.') === 0) {
|
||||
$domain_name = substr($domain_name, 2);
|
||||
}
|
||||
// Allow '*' as wildcard domain
|
||||
if ($domain_name === "*") {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return (preg_match("/^([a-z\d](-*[a-z\d])*)(\.([a-z\d](-*[a-z\d])*))*$/i", $domain_name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user