From 747e74a3dd4785a9f8f25efdded6e213e607d5e2 Mon Sep 17 00:00:00 2001 From: Pinga <121483313+getpinga@users.noreply.github.com> Date: Tue, 12 Mar 2024 15:58:10 +0200 Subject: [PATCH] Small forgotten fixes --- rdap/start_rdap.php | 4 +++- whois/port43/start_whois.php | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/rdap/start_rdap.php b/rdap/start_rdap.php index bddd3f6..c8e2efd 100644 --- a/rdap/start_rdap.php +++ b/rdap/start_rdap.php @@ -148,6 +148,7 @@ function handleDomainQuery($request, $response, $pdo, $domainName, $c, $log) { // Extract TLD from the domain $parts = explode('.', $domain); + $domainName = $parts[0]; $tld = "." . end($parts); // Check if the TLD exists in the service_domain table @@ -171,7 +172,8 @@ function handleDomainQuery($request, $response, $pdo, $domainName, $c, $log) { DATE_FORMAT(`updated_at`, '%Y-%m-%dT%H:%i:%sZ') AS `update`, DATE_FORMAT(`expires_at`, '%Y-%m-%dT%H:%i:%sZ') AS `exdate` FROM service_domain WHERE sld = :domain AND tld = :tld"); - $stmt1->bindParam(':domain', $domain, PDO::PARAM_STR); + $stmt1->bindParam(':domain', $domainName, PDO::PARAM_STR); + $stmt1->bindParam(':tld', $tld, PDO::PARAM_STR); $stmt1->execute(); $domainDetails = $stmt1->fetch(PDO::FETCH_ASSOC); diff --git a/whois/port43/start_whois.php b/whois/port43/start_whois.php index 19b4c54..134d515 100644 --- a/whois/port43/start_whois.php +++ b/whois/port43/start_whois.php @@ -109,6 +109,7 @@ // Extract TLD from the domain and prepend a dot $parts = explode('.', $domain); + $domainName = $parts[0]; $tld = "." . end($parts); // Check if the TLD exists in the service_domain table