use common Valid library methods to check URL and addresses

This commit is contained in:
ghost 2023-09-15 22:12:18 +03:00
parent eb43fb4b18
commit 43c617e893
13 changed files with 225 additions and 236 deletions

View file

@ -269,7 +269,7 @@ try
$uri = $db->getUri($addressTracker->uriId);
// Yggdrasil host only
if (!preg_match(YGGDRASIL_HOST_REGEX, str_replace(['[',']'], false, $host->value)))
if (!Valid::host($host->value))
{
continue;
}
@ -295,7 +295,7 @@ try
$uri = $db->getUri($acceptableSource->uriId);
// Yggdrasil host only
if (!preg_match(YGGDRASIL_HOST_REGEX, str_replace(['[',']'], false, $host->value)))
if (!Valid::host($host->value))
{
continue;
}
@ -321,7 +321,7 @@ try
$uri = $db->getUri($eXactSource->uriId);
// Yggdrasil host only
if (!preg_match(YGGDRASIL_HOST_REGEX, str_replace(['[',']'], false, $host->value)))
if (!Valid::host($host->value))
{
continue;
}