mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
fix: add support for IDN TLD search
This commit is contained in:
@@ -356,7 +356,7 @@ readonly class RDAPService
|
|||||||
if (false === $lastDotPosition) {
|
if (false === $lastDotPosition) {
|
||||||
throw new BadRequestException('Domain must contain at least one dot');
|
throw new BadRequestException('Domain must contain at least one dot');
|
||||||
}
|
}
|
||||||
$tld = strtolower(substr($domain, $lastDotPosition + 1));
|
$tld = strtolower(idn_to_ascii(substr($domain, $lastDotPosition + 1)));
|
||||||
|
|
||||||
return $this->tldRepository->findOneBy(['tld' => $tld]);
|
return $this->tldRepository->findOneBy(['tld' => $tld]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user