mirror of
https://github.com/pi-hole/web.git
synced 2026-02-15 07:25:39 +00:00
Allow the root zone . to be excluded from top lists
Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user