Skip to content

Commit

Permalink
Small forgotten fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
getpinga committed Mar 12, 2024
1 parent a68c079 commit 747e74a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rdap/start_rdap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);

Expand Down
1 change: 1 addition & 0 deletions whois/port43/start_whois.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 747e74a

Please sign in to comment.