mirror of
https://github.com/getnamingo/registry.git
synced 2025-05-29 08:50:03 +02:00
Small fixes around roids
This commit is contained in:
parent
e0f77397d8
commit
93f1cd7674
6 changed files with 24 additions and 23 deletions
|
@ -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',
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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' => [
|
||||
[
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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:";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue