mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
fix: a registry was applying the same EPP status code twice
This commit is contained in:
@@ -183,9 +183,10 @@ readonly class RDAPService
|
|||||||
$domain->setTld($tld)->setLdhName($idnDomain)->setDeleted(false)->updateTimestamps();
|
$domain->setTld($tld)->setLdhName($idnDomain)->setDeleted(false)->updateTimestamps();
|
||||||
|
|
||||||
if (array_key_exists('status', $res)) {
|
if (array_key_exists('status', $res)) {
|
||||||
$addedStatus = array_diff($res['status'], $domain->getStatus());
|
$status = array_unique($res['status']); // It was observed that a registry was applying the same EPP status code twice.
|
||||||
$deletedStatus = array_diff($domain->getStatus(), $res['status']);
|
$addedStatus = array_diff($status, $domain->getStatus());
|
||||||
$domain->setStatus($res['status']);
|
$deletedStatus = array_diff($domain->getStatus(), $status);
|
||||||
|
$domain->setStatus($status);
|
||||||
|
|
||||||
if (count($addedStatus) > 0 || count($deletedStatus) > 0) {
|
if (count($addedStatus) > 0 || count($deletedStatus) > 0) {
|
||||||
$this->em->persist($domain);
|
$this->em->persist($domain);
|
||||||
@@ -351,7 +352,7 @@ readonly class RDAPService
|
|||||||
$nameserver->addNameserverEntity($nameserverEntity
|
$nameserver->addNameserverEntity($nameserverEntity
|
||||||
->setNameserver($nameserver)
|
->setNameserver($nameserver)
|
||||||
->setEntity($entity)
|
->setEntity($entity)
|
||||||
->setStatus($rdapNameserver['status'])
|
->setStatus(array_unique($rdapNameserver['status']))
|
||||||
->setRoles($roles));
|
->setRoles($roles));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user