[Web] Revert - allow "*" as wildcard domain

This commit is contained in:
FreddleSpl0it 2025-09-23 10:07:33 +02:00
parent f2c4697ca3
commit 28985973eb
No known key found for this signature in database
GPG Key ID: 00E14E7634F4BEC5

View File

@ -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)