' . htmlspecialchars($_POST['domain']) . '
'));
if (equalArrays([CONF['ht']['ipv6_address']], array_column($remoteAaaaRecords, 'ipv6')) !== true)
output(403, sprintf(_('This domain must have %2$s as its only %1$s record.'), 'AAAA', '' . CONF['ht']['ipv6_address'] . '
'));
$remoteARecords = dns_get_record($_POST['domain'], DNS_A);
if (is_array($remoteARecords) !== true)
- output(500, sprintf(_('Can\'t retrieve the %s record.'), 'A'));
+ output(500, sprintf(_('Can\'t retrieve the %1$s record for domain %2$s.'), 'A', '' . htmlspecialchars($_POST['domain']) . '
'));
if (equalArrays([CONF['ht']['ipv4_address']], array_column($remoteARecords, 'ip')) !== true)
output(403, sprintf(_('This domain must have %2$s as its only %1$s record.'), 'A', '' . CONF['ht']['ipv4_address'] . '
'));
-$remoteTXTRecords = dns_get_record($_POST['domain'], DNS_TXT);
+$remoteTXTRecords = dns_get_record('_auth.' . $_POST['domain'], DNS_TXT);
if (is_array($remoteTXTRecords) !== true)
- output(500, sprintf(_('Can\'t retrieve the %s record.'), 'TXT'));
-if (preg_match('/^' . preg_quote(SERVER_NAME, '/') . '_domain-verification=([0-9a-f]{8})-([0-9a-f]{32})$/Dm', implode(LF, array_column($remoteTXTRecords, 'txt')), $matches) !== 1)
- output(403, _('No TXT record with the expected format has been found.'));
+ output(500, sprintf(_('Can\'t retrieve the %1$s record for domain %2$s.'), 'TXT', '_auth.' . htmlspecialchars($_POST['domain']) . '
'));
+if (preg_match('/^' . preg_quote(SERVER_NAME, '/') . '_domain-verification=(?_auth.' . htmlspecialchars($_POST['domain']) . '
'));
-checkAuthToken($matches[1], $matches[2]);
+checkAuthToken($matches['salt'], $matches['hash']);
rateLimit();
diff --git a/pg-view/ht/add-dns.php b/pg-view/ht/add-dns.php
index 02432cf..58c1a17 100644
--- a/pg-view/ht/add-dns.php
+++ b/pg-view/ht/add-dns.php
@@ -1,30 +1,33 @@
- = _('A Let\'s Encrypt certificate will be obtained.') ?> + = _('A Let\'s Encrypt certificate will be obtained for this domain.') ?>
- = _('The domain must have the following records when the form is being processed.') ?>
+ = sprintf(_('The AAAA, A and CAA records for the domain must resolve to the same values as %s. This can be done by creating a CNAME record pointing to this domain for a non-apex domain, or using a nonstandard "ALIAS", "synchronized" or "flattened CNAME" record for an apex domain. You may alternatively manually copy records values, but it\'ll require a manual update when these values change.'), '' . CONF['ht']['cname'] . '
') ?>
AAAA
= CONF['ht']['ipv6_address'] ?>
- A
= CONF['ht']['ipv4_address'] ?>
- TXT
= SERVER_NAME ?>_domain-verification== getAuthToken() ?>
- CAA
0 issue "letsencrypt.org; validationmethods=http-01; accounturi== (($_SESSION['type'] ?? 'approved') === 'approved') ? CONF['ht']['caa_account_uri'] : CONF['ht']['caa_account_uri_staging'] ?>"
- AAAA
= CONF['ht']['ipv6_address'] ?>
+ A
= CONF['ht']['ipv4_address'] ?>
+ CAA
0 issue "letsencrypt.org; validationmethods=http-01; accounturi== (($_SESSION['type'] ?? 'approved') === 'approved') ? CONF['ht']['caa_account_uri'] : CONF['ht']['caa_account_uri_staging'] ?>"
+
+ = sprintf(_('Also, to prove that you own this domain, its subdomain %1$s must have a TXT record equal to %2$s when the form is being processed.'), '_auth
', '' . SERVER_NAME . '_domain-verification=' . getAuthToken() . '
') ?>
+