From 9df6c24a75dcf7728cfb74c0dd422c660dc891e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Gangloff?= Date: Wed, 18 Dec 2024 19:09:54 +0100 Subject: [PATCH] fix: a registry was applying the same EPP status code twice --- src/Service/RDAPService.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Service/RDAPService.php b/src/Service/RDAPService.php index a76aca0..18da204 100644 --- a/src/Service/RDAPService.php +++ b/src/Service/RDAPService.php @@ -183,9 +183,10 @@ readonly class RDAPService $domain->setTld($tld)->setLdhName($idnDomain)->setDeleted(false)->updateTimestamps(); if (array_key_exists('status', $res)) { - $addedStatus = array_diff($res['status'], $domain->getStatus()); - $deletedStatus = array_diff($domain->getStatus(), $res['status']); - $domain->setStatus($res['status']); + $status = array_unique($res['status']); // It was observed that a registry was applying the same EPP status code twice. + $addedStatus = array_diff($status, $domain->getStatus()); + $deletedStatus = array_diff($domain->getStatus(), $status); + $domain->setStatus($status); if (count($addedStatus) > 0 || count($deletedStatus) > 0) { $this->em->persist($domain); @@ -351,7 +352,7 @@ readonly class RDAPService $nameserver->addNameserverEntity($nameserverEntity ->setNameserver($nameserver) ->setEntity($entity) - ->setStatus($rdapNameserver['status']) + ->setStatus(array_unique($rdapNameserver['status'])) ->setRoles($roles)); }