fix: add support for IDN TLD search

This commit is contained in:
Maël Gangloff
2024-08-28 23:21:19 +02:00
parent b3544a4d08
commit 8efb8575cb

View File

@@ -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]);
} }