Skip to content

Commit a3a5890

Browse files
committed
Merge branch 'develop' for v3.6.2
2 parents 8a13026 + 3518dd4 commit a3a5890

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/helper/class-ee-site.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1733,7 +1733,7 @@ public function ssl_verify( $args = [], $assoc_args = [], $www_or_non_www = fals
17331733
* [--format=<format>]
17341734
* : Render output in a particular format.
17351735
* ---
1736-
* default: table
1736+
* default: json
17371737
* options:
17381738
* - table
17391739
* - csv
@@ -1779,7 +1779,13 @@ public function ssl_info( $args, $assoc_args ) {
17791779
$challenge = $client->loadDomainAuthorizationChallenge( $domain );
17801780
if ( method_exists( $challenge, 'toArray' ) ) {
17811781
$data = $challenge->toArray();
1782-
$record_name = isset( $data['dnsRecordName'] ) ? $data['dnsRecordName'] : '_acme-challenge.' . $domain;
1782+
// Always use _acme-challenge.base-domain for wildcard domains
1783+
if ( 0 === strpos( $domain, '*.' ) ) {
1784+
$base_domain = substr( $domain, 2 );
1785+
$record_name = '_acme-challenge.' . $base_domain;
1786+
} else {
1787+
$record_name = isset( $data['dnsRecordName'] ) ? $data['dnsRecordName'] : '_acme-challenge.' . $domain;
1788+
}
17831789
if ( isset( $data['dnsRecordValue'] ) ) {
17841790
$record_value = $data['dnsRecordValue'];
17851791
} elseif ( isset( $data['payload'] ) ) {

0 commit comments

Comments
 (0)