feat: check malformed domain names

This commit is contained in:
Maël Gangloff
2025-10-16 14:16:58 +02:00
parent a20344816c
commit a143039925
8 changed files with 77 additions and 32 deletions

View File

@@ -6,6 +6,7 @@ use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use App\Config\EventAction;
use App\Exception\MalformedDomainException;
use App\Repository\DomainRepository;
use App\Service\RDAPService;
use App\State\AutoRegisterDomainProvider;
@@ -177,6 +178,9 @@ class Domain
return $this->ldhName;
}
/**
* @throws MalformedDomainException
*/
public function setLdhName(string $ldhName): static
{
$this->ldhName = RDAPService::convertToIdn($ldhName);