From 8efb8575cb9c2c6a7b4b47a2ade48d7b2f4e56d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Gangloff?= Date: Wed, 28 Aug 2024 23:21:19 +0200 Subject: [PATCH] fix: add support for IDN TLD search --- src/Service/RDAPService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Service/RDAPService.php b/src/Service/RDAPService.php index b20bbdb..a39a337 100644 --- a/src/Service/RDAPService.php +++ b/src/Service/RDAPService.php @@ -356,7 +356,7 @@ readonly class RDAPService if (false === $lastDotPosition) { 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]); }