From 2ebf1eee2a9bd665ef4146e3b4ef1e0fd4a5444a Mon Sep 17 00:00:00 2001 From: Miraty Date: Sun, 13 Aug 2023 19:50:45 +0200 Subject: [PATCH] minor fixes --- init.php | 3 +-- pg-act/ns/zone-add.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/init.php b/init.php index ddfac3b..89b2bda 100644 --- a/init.php +++ b/init.php @@ -1,5 +1,6 @@ 2. TLDs for Testing, & Documentation Examples const PLACEHOLDER_IPV6 = '2001:db8::3'; // From RFC3849: IPv6 Address Prefix Reserved for Documentation const PLACEHOLDER_IPV4 = '203.0.113.42'; // From RFC5737: IPv4 Address Blocks Reserved for Documentation diff --git a/pg-act/ns/zone-add.php b/pg-act/ns/zone-add.php index 51f586e..c178548 100644 --- a/pg-act/ns/zone-add.php +++ b/pg-act/ns/zone-add.php @@ -11,7 +11,7 @@ if ($parent_authoritatives === []) foreach ($parent_authoritatives as $parent_authoritative) checkAbsoluteDomainFormat($parent_authoritative); -$ns_records = array_column(kdig(name: $_POST['domain'], type: 'NS', server: (CONF['ns']['local_only_check'] ? CONF['reg']['address'] : $parentAuthoritatives[0]))['authorityRRs'], 'rdataNS'); +$ns_records = array_column(kdig(name: $_POST['domain'], type: 'NS', server: (CONF['ns']['local_only_check'] ? CONF['reg']['address'] : $parent_authoritative[0]))['authorityRRs'], 'rdataNS'); if (preg_match('/^(?[0-9a-f]{8})-(?[0-9a-f]{32})\._domain-verification\.' . preg_quote(SERVER_NAME, '/') . '\.$/Dm', implode(LF, $ns_records), $matches) !== 1) output(403, _('NS authentication record not found.'));