domain validation should be compatible with ipv6 only

Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
szaimen 2022-06-30 14:47:37 +02:00
parent dfb672811f
commit 00c6eeda44

View file

@ -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 . "')");