Skip to content

Commit 40c3826

Browse files
author
Thom
committed
Fix DNS zone check for subdomains (#4202)
1 parent 75d2a63 commit 40c3826

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

server/lib/classes/letsencrypt.inc.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -438,10 +438,8 @@ public function request_certificates($data, $server_type = 'apache') {
438438
} else { // DNS-01 verification
439439
$temp_domain_parts = preg_split("/[.]/", $temp_domain);
440440
foreach ($temp_domain_parts as $temp_domain_part) {
441-
if (isset($temp_domain_parts['1'])) {
442-
$queryDomains[] = preg_replace("/.*" . preg_quote($temp_domain_parts['0']) . "\." . "/", "", $temp_domain);
443-
array_shift($temp_domain_parts);
444-
}
441+
$queryDomains[] = preg_replace("/.*" . preg_quote($temp_domain_parts['0']) . "\." . "/", "", $temp_domain);
442+
array_shift($temp_domain_parts);
445443
}
446444
foreach ($queryDomains as $queryDomain) {
447445
$sql = "SELECT * FROM dns_soa WHERE active = 'y' AND origin = '" . $queryDomain . ".'";

0 commit comments

Comments
 (0)