mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-11 00:07:59 +00:00
Merge pull request #874 from nextcloud/fix/872/ipv6-domain-validatioin
domain validation should be compatible with ipv6 only as well
This commit is contained in:
commit
86f15d0911
1 changed files with 7 additions and 0 deletions
|
|
@ -203,6 +203,13 @@ class ConfigurationManager
|
|||
$dnsRecordIP = '';
|
||||
}
|
||||
|
||||
if (empty($dnsRecordIP)) {
|
||||
$record = dns_get_record($domain, DNS_AAAA);
|
||||
if (!empty($record)) {
|
||||
$dnsRecordIP = $record[0]['ipv6'];
|
||||
}
|
||||
}
|
||||
|
||||
// Validate IP
|
||||
if(!filter_var($dnsRecordIP, FILTER_VALIDATE_IP)) {
|
||||
throw new InvalidSettingConfigurationException("DNS config is not set for this domain or the domain is not a valid domain! (It was found to be set to '" . $dnsRecordIP . "')");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue