Domain parsing fixes

This commit is contained in:
Pinga 2023-12-14 13:17:37 +02:00
parent d172717f0a
commit 9fe3b3f20a
10 changed files with 175 additions and 23 deletions

View file

@ -129,9 +129,11 @@ function processDomainCheck($conn, $db, $xml, $trans) {
$domainEntry[] = 'In use';
} else {
// Check if the domain is reserved
$parts = explode('.', $domainName);
$parts = extractDomainAndTLD($domainName);
$label = $parts['domain'];
$stmt = $db->prepare("SELECT type FROM reserved_domain_names WHERE name = :domainName LIMIT 1");
$stmt->bindParam(':domainName', $parts[0], PDO::PARAM_STR);
$stmt->bindParam(':domainName', $label, PDO::PARAM_STR);
$stmt->execute();
$reserved = $stmt->fetchColumn();