mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat: check malformed domain names
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user