diff --git a/webui/system/misc.php b/webui/system/misc.php index d7caf03..0b51608 100644 --- a/webui/system/misc.php +++ b/webui/system/misc.php @@ -168,11 +168,7 @@ function validdomain($domain = '') { - if($domain == '') { return 0; } - - if(preg_match("/@local$/", $domain)) { return 1; } - - if(preg_match('/@?[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,10})$/', $domain)) { + if(preg_match("/@?local$/", $domain) || preg_match('/^[a-zA-Z0-9]+[a-zA-Z0-9-_\.]{0,}\.[a-zA-Z0-9]{2,10}$/', $domain)) { return 1; }