diff --git a/automation/config.php.dist b/automation/config.php.dist index 8f885a9..2e3e18c 100644 --- a/automation/config.php.dist +++ b/automation/config.php.dist @@ -29,6 +29,7 @@ return [ 'escrow_report_url' => 'https://ry-api.icann.org/report/', 'escrow_report_username' => 'your_username', 'escrow_report_password' => 'your_password', + 'roid' => 'XX', // Reporting Configuration 'reporting_path' => '/opt/reporting', diff --git a/automation/escrow.php b/automation/escrow.php index b47f941..61f1d09 100644 --- a/automation/escrow.php +++ b/automation/escrow.php @@ -172,7 +172,7 @@ try { foreach ($domains as $domain) { $xml->startElement('rdeDom:domain'); $xml->writeElement('rdeDom:name', $domain['name']); - $xml->writeElement('rdeDom:roid', 'D' . $domain['id']); + $xml->writeElement('rdeDom:roid', 'D' . $domain['id'] . '-' . $c['roid']); $xml->writeElement('rdeDom:uName', $domain['name']); $xml->writeElement('rdeDom:idnTableId', 'Latn'); @@ -227,7 +227,7 @@ try { foreach ($hosts as $host) { $xml->startElement('rdeHost:host'); $xml->writeElement('rdeHost:name', $host['name']); - $xml->writeElement('rdeHost:roid', 'H' . $host['id']); + $xml->writeElement('rdeHost:roid', 'H' . $host['id'] . '-' . $c['roid']); $xml->startElement('rdeHost:status'); $xml->writeAttribute('s', 'ok'); @@ -249,8 +249,8 @@ try { foreach ($contacts as $contact) { $xml->startElement('rdeContact:contact'); - $xml->writeElement('rdeContact:id', $contact['identifier']); - $xml->writeElement('rdeContact:roid', 'C' . $contact['id']); + $xml->writeElement('rdeContact:id', $contact['id']); + $xml->writeElement('rdeContact:roid', 'C' . $contact['id'] . '-' . $c['roid']); $xml->startElement('rdeContact:status'); $xml->writeAttribute('s', 'ok'); $xml->text('ok'); @@ -299,7 +299,7 @@ try { $xml->startElement('rdeRegistrar:registrar'); foreach ($registrars as $registrar) { - $xml->writeElement('rdeRegistrar:id', $registrar['clid']); + $xml->writeElement('rdeRegistrar:id', $registrar['id']); $xml->writeElement('rdeRegistrar:name', $registrar['name']); $xml->writeElement('rdeRegistrar:gurid', $registrar['iana_id']); $xml->writeElement('rdeRegistrar:status', 'ok'); @@ -702,7 +702,7 @@ try { foreach ($domains as $domain) { $xml->startElement('rdeDom:domain'); $xml->writeElement('rdeDom:name', $domain['name']); - $xml->writeElement('rdeDom:roid', 'D' . $domain['id']); + $xml->writeElement('rdeDom:roid', 'D' . $domain['id'] . '-' . $c['roid']); $xml->writeElement('rdeDom:uName', $domain['name']); $xml->writeElement('rdeDom:idnTableId', 'Latn'); @@ -756,7 +756,7 @@ try { $xml->startElement('rdeRegistrar:registrar'); foreach ($registrars as $registrar) { - $xml->writeElement('rdeRegistrar:id', $registrar['clid']); + $xml->writeElement('rdeRegistrar:id', $registrar['id']); $xml->writeElement('rdeRegistrar:name', $registrar['name']); $xml->writeElement('rdeRegistrar:gurid', $registrar['iana_id']); $xml->writeElement('rdeRegistrar:status', 'ok'); diff --git a/epp/src/epp-info.php b/epp/src/epp-info.php index ea59c05..24bd207 100644 --- a/epp/src/epp-info.php +++ b/epp/src/epp-info.php @@ -64,7 +64,7 @@ function processContactInfo($conn, $db, $xml, $trans) { 'resultCode' => 1000, 'msg' => 'Command completed successfully', 'id' => $contact['id'], - 'roid' => 'C' . $contact['identifier'], + 'roid' => 'C' . $contact['id'], 'status' => $statusArray, 'postal' => $postalArray, 'voice' => $contact['voice'], @@ -82,7 +82,7 @@ function processContactInfo($conn, $db, $xml, $trans) { $epp = new EPP\EppWriter(); $xml = $epp->epp_writer($response); - updateTransaction($db, 'info', 'contact', 'C_'.$contact['identifier'], 1000, 'Command completed successfully', $svTRID, $xml, $trans); + updateTransaction($db, 'info', 'contact', 'C_'.$contact['id'], 1000, 'Command completed successfully', $svTRID, $xml, $trans); sendEppResponse($conn, $xml); } catch (PDOException $e) { diff --git a/rdap/helpers.php b/rdap/helpers.php index c95a3c9..9d6e5f0 100644 --- a/rdap/helpers.php +++ b/rdap/helpers.php @@ -44,7 +44,7 @@ function setupLogger($logFilePath, $channelName = 'app') { function mapContactToVCard($contactDetails, $role, $c) { return [ 'objectClassName' => 'entity', - 'handle' => ['C' . $contactDetails['identifier'] . '-' . $c['roid']], + 'handle' => ['C' . $contactDetails['id'] . '-' . $c['roid']], 'roles' => [$role], 'remarks' => [ [ diff --git a/rdap/start_rdap.php b/rdap/start_rdap.php index c3f4f4e..e5f7b14 100644 --- a/rdap/start_rdap.php +++ b/rdap/start_rdap.php @@ -416,7 +416,7 @@ function handleDomainQuery($request, $response, $pdo, $domainName, $c, $log) { $registrarAbuseDetails = $stmt3a->fetch(PDO::FETCH_ASSOC); // Query 4: Get registrant details - $stmt4 = $pdo->prepare("SELECT contact.identifier,contact_postalInfo.name,contact_postalInfo.org,contact_postalInfo.street1,contact_postalInfo.street2,contact_postalInfo.street3,contact_postalInfo.city,contact_postalInfo.sp,contact_postalInfo.pc,contact_postalInfo.cc,contact.voice,contact.voice_x,contact.fax,contact.fax_x,contact.email FROM contact,contact_postalInfo WHERE contact.id=:registrant AND contact_postalInfo.contact_id=contact.id"); + $stmt4 = $pdo->prepare("SELECT contact.id,contact_postalInfo.name,contact_postalInfo.org,contact_postalInfo.street1,contact_postalInfo.street2,contact_postalInfo.street3,contact_postalInfo.city,contact_postalInfo.sp,contact_postalInfo.pc,contact_postalInfo.cc,contact.voice,contact.voice_x,contact.fax,contact.fax_x,contact.email FROM contact,contact_postalInfo WHERE contact.id=:registrant AND contact_postalInfo.contact_id=contact.id"); $stmt4->bindParam(':registrant', $domainDetails['registrant'], PDO::PARAM_INT); $stmt4->execute(); $registrantDetails = $stmt4->fetch(PDO::FETCH_ASSOC); @@ -432,7 +432,7 @@ function handleDomainQuery($request, $response, $pdo, $domainName, $c, $log) { $billingDetails = []; foreach ($contactMap as $map) { - $stmtDetails = $pdo->prepare("SELECT contact.identifier, contact_postalInfo.name, contact_postalInfo.org, contact_postalInfo.street1, contact_postalInfo.street2, contact_postalInfo.street3, contact_postalInfo.city, contact_postalInfo.sp, contact_postalInfo.pc, contact_postalInfo.cc, contact.voice, contact.voice_x, contact.fax, contact.fax_x, contact.email FROM contact, contact_postalInfo WHERE contact.id = :contact_id AND contact_postalInfo.contact_id = contact.id"); + $stmtDetails = $pdo->prepare("SELECT contact.id, contact_postalInfo.name, contact_postalInfo.org, contact_postalInfo.street1, contact_postalInfo.street2, contact_postalInfo.street3, contact_postalInfo.city, contact_postalInfo.sp, contact_postalInfo.pc, contact_postalInfo.cc, contact.voice, contact.voice_x, contact.fax, contact.fax_x, contact.email FROM contact, contact_postalInfo WHERE contact.id = :contact_id AND contact_postalInfo.contact_id = contact.id"); $stmtDetails->bindParam(':contact_id', $map['contact_id'], PDO::PARAM_INT); $stmtDetails->execute(); diff --git a/whois/port43/start_whois.php b/whois/port43/start_whois.php index 7e7e635..d717837 100644 --- a/whois/port43/start_whois.php +++ b/whois/port43/start_whois.php @@ -235,7 +235,7 @@ $server->on('receive', function ($server, $fd, $reactorId, $data) use ($c, $pool $res .= "\nDomain Status: ok https://icann.org/epp#ok"; } - $query5 = "SELECT contact.identifier,contact_postalInfo.name,contact_postalInfo.org,contact_postalInfo.street1,contact_postalInfo.street2,contact_postalInfo.street3,contact_postalInfo.city,contact_postalInfo.sp,contact_postalInfo.pc,contact_postalInfo.cc,contact.voice,contact.fax,contact.email + $query5 = "SELECT contact.id,contact_postalInfo.name,contact_postalInfo.org,contact_postalInfo.street1,contact_postalInfo.street2,contact_postalInfo.street3,contact_postalInfo.city,contact_postalInfo.sp,contact_postalInfo.pc,contact_postalInfo.cc,contact.voice,contact.fax,contact.email FROM contact,contact_postalInfo WHERE contact.id=:registrant AND contact_postalInfo.contact_id=contact.id"; $stmt5 = $pdo->prepare($query5); $stmt5->bindParam(':registrant', $f['registrant'], PDO::PARAM_INT); @@ -257,7 +257,7 @@ $server->on('receive', function ($server, $fd, $reactorId, $data) use ($c, $pool ."\nRegistrant Fax: REDACTED FOR PRIVACY" ."\nRegistrant Email: Kindly refer to the RDDS server associated with the identified registrar in this output to obtain contact details for the Registrant, Admin, or Tech associated with the queried domain name."; } else { - $res .= "\nRegistry Registrant ID: C".$f2['identifier']."-".$c['roid'] + $res .= "\nRegistry Registrant ID: C".$f2['id']."-".$c['roid'] ."\nRegistrant Name: ".$f2['name'] ."\nRegistrant Organization: ".$f2['org'] ."\nRegistrant Street: ".$f2['street1'] @@ -272,7 +272,7 @@ $server->on('receive', function ($server, $fd, $reactorId, $data) use ($c, $pool ."\nRegistrant Email: ".$f2['email']; } - $query6 = "SELECT contact.identifier,contact_postalInfo.name,contact_postalInfo.org,contact_postalInfo.street1,contact_postalInfo.street2,contact_postalInfo.street3,contact_postalInfo.city,contact_postalInfo.sp,contact_postalInfo.pc,contact_postalInfo.cc,contact.voice,contact.fax,contact.email + $query6 = "SELECT contact.id,contact_postalInfo.name,contact_postalInfo.org,contact_postalInfo.street1,contact_postalInfo.street2,contact_postalInfo.street3,contact_postalInfo.city,contact_postalInfo.sp,contact_postalInfo.pc,contact_postalInfo.cc,contact.voice,contact.fax,contact.email FROM domain_contact_map,contact,contact_postalInfo WHERE domain_contact_map.domain_id=:domain_id AND domain_contact_map.type='admin' AND domain_contact_map.contact_id=contact.id AND domain_contact_map.contact_id=contact_postalInfo.contact_id"; $stmt6 = $pdo->prepare($query6); $stmt6->bindParam(':domain_id', $f['id'], PDO::PARAM_INT); @@ -294,8 +294,8 @@ $server->on('receive', function ($server, $fd, $reactorId, $data) use ($c, $pool ."\nAdmin Fax: REDACTED FOR PRIVACY" ."\nAdmin Email: Kindly refer to the RDDS server associated with the identified registrar in this output to obtain contact details for the Registrant, Admin, or Tech associated with the queried domain name."; } else { - if (!empty($f2['identifier'])) { - $res .= "\nRegistry Admin ID: C" . $f2['identifier'] . "-" . $c['roid']; + if (!empty($f2['id'])) { + $res .= "\nRegistry Admin ID: C" . $f2['id'] . "-" . $c['roid']; } else { $res .= "\nRegistry Admin ID:"; } @@ -313,7 +313,7 @@ $server->on('receive', function ($server, $fd, $reactorId, $data) use ($c, $pool ."\nAdmin Email: ".$f2['email']; } - $query7 = "SELECT contact.identifier,contact_postalInfo.name,contact_postalInfo.org,contact_postalInfo.street1,contact_postalInfo.street2,contact_postalInfo.street3,contact_postalInfo.city,contact_postalInfo.sp,contact_postalInfo.pc,contact_postalInfo.cc,contact.voice,contact.fax,contact.email + $query7 = "SELECT contact.id,contact_postalInfo.name,contact_postalInfo.org,contact_postalInfo.street1,contact_postalInfo.street2,contact_postalInfo.street3,contact_postalInfo.city,contact_postalInfo.sp,contact_postalInfo.pc,contact_postalInfo.cc,contact.voice,contact.fax,contact.email FROM domain_contact_map,contact,contact_postalInfo WHERE domain_contact_map.domain_id=:domain_id AND domain_contact_map.type='billing' AND domain_contact_map.contact_id=contact.id AND domain_contact_map.contact_id=contact_postalInfo.contact_id"; $stmt7 = $pdo->prepare($query7); $stmt7->bindParam(':domain_id', $f['id'], PDO::PARAM_INT); @@ -335,8 +335,8 @@ $server->on('receive', function ($server, $fd, $reactorId, $data) use ($c, $pool ."\nBilling Fax: REDACTED FOR PRIVACY" ."\nBilling Email: Kindly refer to the RDDS server associated with the identified registrar in this output to obtain contact details for the Registrant, Admin, or Tech associated with the queried domain name."; } else { - if (!empty($f2['identifier'])) { - $res .= "\nRegistry Billing ID: C" . $f2['identifier'] . "-" . $c['roid']; + if (!empty($f2['id'])) { + $res .= "\nRegistry Billing ID: C" . $f2['id'] . "-" . $c['roid']; } else { $res .= "\nRegistry Billing ID:"; } @@ -354,7 +354,7 @@ $server->on('receive', function ($server, $fd, $reactorId, $data) use ($c, $pool ."\nBilling Email: ".$f2['email']; } - $query8 = "SELECT contact.identifier,contact_postalInfo.name,contact_postalInfo.org,contact_postalInfo.street1,contact_postalInfo.street2,contact_postalInfo.street3,contact_postalInfo.city,contact_postalInfo.sp,contact_postalInfo.pc,contact_postalInfo.cc,contact.voice,contact.fax,contact.email + $query8 = "SELECT contact.id,contact_postalInfo.name,contact_postalInfo.org,contact_postalInfo.street1,contact_postalInfo.street2,contact_postalInfo.street3,contact_postalInfo.city,contact_postalInfo.sp,contact_postalInfo.pc,contact_postalInfo.cc,contact.voice,contact.fax,contact.email FROM domain_contact_map,contact,contact_postalInfo WHERE domain_contact_map.domain_id=:domain_id AND domain_contact_map.type='tech' AND domain_contact_map.contact_id=contact.id AND domain_contact_map.contact_id=contact_postalInfo.contact_id"; $stmt8 = $pdo->prepare($query8); $stmt8->bindParam(':domain_id', $f['id'], PDO::PARAM_INT); @@ -376,8 +376,8 @@ $server->on('receive', function ($server, $fd, $reactorId, $data) use ($c, $pool ."\nTech Fax: REDACTED FOR PRIVACY" ."\nTech Email: Kindly refer to the RDDS server associated with the identified registrar in this output to obtain contact details for the Registrant, Admin, or Tech associated with the queried domain name."; } else { - if (!empty($f2['identifier'])) { - $res .= "\nRegistry Tech ID: C" . $f2['identifier'] . "-" . $c['roid']; + if (!empty($f2['id'])) { + $res .= "\nRegistry Tech ID: C" . $f2['id'] . "-" . $c['roid']; } else { $res .= "\nRegistry Tech ID:"; }