diff --git a/scripts/pi-hole/php/func.php b/scripts/pi-hole/php/func.php index ce2e2824..712e588a 100644 --- a/scripts/pi-hole/php/func.php +++ b/scripts/pi-hole/php/func.php @@ -45,6 +45,10 @@ function validDomain($domain_name, &$message = null) function validDomainWildcard($domain_name) { + // Skip this checks for the root zone `.` + if ($domain_name == '.') { + return true; + } // There has to be either no or at most one "*" at the beginning of a line $validChars = preg_match('/^((\\*\\.)?[_a-z\\d](-*[_a-z\\d])*)(\\.([_a-z\\d](-*[a-z\\d])*))*(\\.([_a-z\\d])*)*$/i', $domain_name); $lengthCheck = preg_match('/^.{1,253}$/', $domain_name);