mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-01 08:33:22 +02:00
Further fixes about clTRID in error response
This commit is contained in:
parent
d637d1a873
commit
720635367e
6 changed files with 151 additions and 151 deletions
|
@ -5,7 +5,7 @@ function processContactDelete($conn, $db, $xml, $clid, $database_type) {
|
|||
$clTRID = (string) $xml->command->clTRID;
|
||||
|
||||
if (!$contactID) {
|
||||
sendEppError($conn, 2003, 'Required parameter missing');
|
||||
sendEppError($conn, 2003, 'Required parameter missing', $clTRID);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ function processContactDelete($conn, $db, $xml, $clid, $database_type) {
|
|||
$registrar_id_contact = $row['clid'] ?? null;
|
||||
|
||||
if (!$contact_id) {
|
||||
sendEppError($conn, 2303, 'Object does not exist');
|
||||
sendEppError($conn, 2303, 'Object does not exist', $clTRID);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ function processContactDelete($conn, $db, $xml, $clid, $database_type) {
|
|||
$clid = $clid['id'];
|
||||
|
||||
if ($clid !== $registrar_id_contact) {
|
||||
sendEppError($conn, 2201, 'Authorization error');
|
||||
sendEppError($conn, 2201, 'Authorization error', $clTRID);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ function processContactDelete($conn, $db, $xml, $clid, $database_type) {
|
|||
$registrantExists = $stmt->fetchColumn();
|
||||
|
||||
if ($registrantExists) {
|
||||
sendEppError($conn, 2305, 'Object association prohibits operation');
|
||||
sendEppError($conn, 2305, 'Object association prohibits operation', $clTRID);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ function processContactDelete($conn, $db, $xml, $clid, $database_type) {
|
|||
$contactInUse = $stmt->fetchColumn();
|
||||
|
||||
if ($contactInUse) {
|
||||
sendEppError($conn, 2305, 'Object association prohibits operation');
|
||||
sendEppError($conn, 2305, 'Object association prohibits operation', $clTRID);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ function processContactDelete($conn, $db, $xml, $clid, $database_type) {
|
|||
|
||||
while ($status = $stmt->fetchColumn()) {
|
||||
if (preg_match('/.*(UpdateProhibited|DeleteProhibited)$/', $status) || preg_match('/^pending/', $status)) {
|
||||
sendEppError($conn, 2304, 'Object status prohibits operation');
|
||||
sendEppError($conn, 2304, 'Object status prohibits operation', $clTRID);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ function processContactDelete($conn, $db, $xml, $clid, $database_type) {
|
|||
$stmt->execute([$contact_id]);
|
||||
|
||||
if ($stmt->errorCode() != '00000') {
|
||||
sendEppError($conn, 2400, 'Command failed');
|
||||
sendEppError($conn, 2400, 'Command failed', $clTRID);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ function processHostDelete($conn, $db, $xml, $clid, $database_type) {
|
|||
$clTRID = (string) $xml->command->clTRID;
|
||||
|
||||
if (!$hostName) {
|
||||
sendEppError($conn, 2003, 'Required parameter missing');
|
||||
sendEppError($conn, 2003, 'Required parameter missing', $clTRID);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ function processHostDelete($conn, $db, $xml, $clid, $database_type) {
|
|||
$registrar_id_host = $result['clid'] ?? null;
|
||||
|
||||
if (!$host_id) {
|
||||
sendEppError($conn, 2303, 'Object does not exist');
|
||||
sendEppError($conn, 2303, 'Object does not exist', $clTRID);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,7 @@ function processHostDelete($conn, $db, $xml, $clid, $database_type) {
|
|||
$clid = $clid['id'];
|
||||
|
||||
if ($clid !== $registrar_id_host) {
|
||||
sendEppError($conn, 2201, 'Authorization error');
|
||||
sendEppError($conn, 2201, 'Authorization error', $clTRID);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,7 @@ function processHostDelete($conn, $db, $xml, $clid, $database_type) {
|
|||
$nameserver_inuse = $stmt->fetchColumn();
|
||||
|
||||
if ($nameserver_inuse) {
|
||||
sendEppError($conn, 2305, 'Object association prohibits operation');
|
||||
sendEppError($conn, 2305, 'Object association prohibits operation', $clTRID);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -143,7 +143,7 @@ function processHostDelete($conn, $db, $xml, $clid, $database_type) {
|
|||
$stmt->execute([':host_id' => $host_id]);
|
||||
|
||||
if ($stmt->errorCode() != '00000') {
|
||||
sendEppError($conn, 2400, 'Command failed');
|
||||
sendEppError($conn, 2400, 'Command failed', $clTRID);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -166,7 +166,7 @@ function processDomainDelete($conn, $db, $xml, $clid, $database_type) {
|
|||
$clTRID = (string) $xml->command->clTRID;
|
||||
|
||||
if (!$domainName) {
|
||||
sendEppError($conn, 2003, 'Required parameter missing');
|
||||
sendEppError($conn, 2003, 'Required parameter missing', $clTRID);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -180,7 +180,7 @@ function processDomainDelete($conn, $db, $xml, $clid, $database_type) {
|
|||
$result = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if (!$result) {
|
||||
sendEppError($conn, 2303, 'Object does not exist');
|
||||
sendEppError($conn, 2303, 'Object does not exist', $clTRID);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -213,7 +213,7 @@ function processDomainDelete($conn, $db, $xml, $clid, $database_type) {
|
|||
$clid = $clid['id'];
|
||||
|
||||
if ($clid != $registrar_id_domain) {
|
||||
sendEppError($conn, 2201, 'Authorization error');
|
||||
sendEppError($conn, 2201, 'Authorization error', $clTRID);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -222,7 +222,7 @@ function processDomainDelete($conn, $db, $xml, $clid, $database_type) {
|
|||
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
$status = $row['status'];
|
||||
if (preg_match('/.*(UpdateProhibited|DeleteProhibited)$/', $status) || preg_match('/^pending/', $status)) {
|
||||
sendEppError($conn, 2304, 'Object status prohibits operation');
|
||||
sendEppError($conn, 2304, 'Object status prohibits operation', $clTRID);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -253,7 +253,7 @@ function processDomainDelete($conn, $db, $xml, $clid, $database_type) {
|
|||
$price = $stmt->fetchColumn();
|
||||
|
||||
if (!isset($price)) {
|
||||
sendEppError($conn, 2400, 'Command failed');
|
||||
sendEppError($conn, 2400, 'Command failed', $clTRID);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -287,7 +287,7 @@ function processDomainDelete($conn, $db, $xml, $clid, $database_type) {
|
|||
$stmt->execute([$domain_id]);
|
||||
|
||||
if ($stmt->errorCode() != "00000") {
|
||||
sendEppError($conn, 2400, 'Command failed');
|
||||
sendEppError($conn, 2400, 'Command failed', $clTRID);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -311,7 +311,7 @@ function processDomainDelete($conn, $db, $xml, $clid, $database_type) {
|
|||
$price = $stmt->fetchColumn();
|
||||
|
||||
if (!isset($price)) {
|
||||
sendEppError($conn, 2400, 'Command failed');
|
||||
sendEppError($conn, 2400, 'Command failed', $clTRID);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -335,7 +335,7 @@ function processDomainDelete($conn, $db, $xml, $clid, $database_type) {
|
|||
$price = $stmt->fetchColumn();
|
||||
|
||||
if (!isset($price)) {
|
||||
sendEppError($conn, 2400, 'Command failed');
|
||||
sendEppError($conn, 2400, 'Command failed', $clTRID);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -361,7 +361,7 @@ function processDomainDelete($conn, $db, $xml, $clid, $database_type) {
|
|||
$price = $stmt->fetchColumn();
|
||||
|
||||
if (!isset($price)) {
|
||||
sendEppError($conn, 2400, 'Command failed');
|
||||
sendEppError($conn, 2400, 'Command failed', $clTRID);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue