Update epp-update.php

This commit is contained in:
Pinga 2025-07-09 14:44:11 +03:00
parent 8f92beda12
commit db3b19e116

View file

@ -937,20 +937,20 @@ function processHostUpdate($conn, $db, $xml, $clid, $database_type, $trans) {
$domain_id = $hostRow['domain_id']; $domain_id = $hostRow['domain_id'];
$host_id = $hostRow['id']; $host_id = $hostRow['id'];
$tlds_scan = $db->query("SELECT tld FROM domain_tld")->fetchAll(PDO::FETCH_COLUMN);
$chg_domain = extractDomainFromHost($chg_name, $tlds_scan);
$stmt = $db->prepare("SELECT clid FROM domain WHERE name = ? LIMIT 1");
$stmt->execute([$chg_domain]);
$chg_clid = $stmt->fetchColumn();
$stmt->closeCursor();
if ($chg_clid !== false && $chg_clid !== $clid) {
sendEppError($conn, $db, 2304, 'Host rename denied: domain owned by another registrar', $clTRID, $trans);
return;
}
if ($domain_id !== null) { if ($domain_id !== null) {
$tlds_scan = $db->query("SELECT tld FROM domain_tld")->fetchAll(PDO::FETCH_COLUMN);
$chg_domain = extractDomainFromHost($chg_name, $tlds_scan);
$stmt = $db->prepare("SELECT clid FROM domain WHERE name = ? LIMIT 1");
$stmt->execute([$chg_domain]);
$chg_clid = $stmt->fetchColumn();
$stmt->closeCursor();
if ($chg_clid !== false && $chg_clid !== $clid) {
sendEppError($conn, $db, 2304, 'Host rename denied: domain owned by another registrar', $clTRID, $trans);
return;
}
$stmt = $db->prepare("SELECT name FROM domain WHERE id = ? LIMIT 1"); $stmt = $db->prepare("SELECT name FROM domain WHERE id = ? LIMIT 1");
$stmt->execute([$domain_id]); $stmt->execute([$domain_id]);
$domain_name = $stmt->fetchColumn(); $domain_name = $stmt->fetchColumn();