Merge pull request #268 from nextcloud/fix/241/validate-ip-address

ip-addresses are not supported as domain
This commit is contained in:
Simon L 2022-02-23 18:04:10 +01:00 committed by GitHub
commit 5b278ca261
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -126,6 +126,11 @@ class ConfigurationManager
throw new InvalidSettingConfigurationException("Domain is not in a valid format!");
}
// Validate that it is not an IP-address
if(filter_var($domain, FILTER_VALIDATE_IP)) {
throw new InvalidSettingConfigurationException("Please enter a domain and not an IP-address!");
}
$dnsRecordIP = gethostbyname($domain);
// Validate IP