Merge pull request #4824 from M-arcus/patch-1
[BUGFIX] DB: Don't check DNS on IPs
This commit is contained in:
commit
60e8ada6d6
1 changed files with 2 additions and 1 deletions
|
@ -52,7 +52,8 @@ class dba {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($install) {
|
if ($install) {
|
||||||
if (strlen($server) && ($server !== 'localhost') && ($server !== '127.0.0.1')) {
|
// server has to be a non-empty string that is not 'localhost' and not an IP
|
||||||
|
if (strlen($server) && ($server !== 'localhost') && filter_var($server, FILTER_VALIDATE_IP) === false) {
|
||||||
if (! dns_get_record($server, DNS_A + DNS_CNAME)) {
|
if (! dns_get_record($server, DNS_A + DNS_CNAME)) {
|
||||||
self::$error = L10n::t('Cannot locate DNS info for database server \'%s\'', $server);
|
self::$error = L10n::t('Cannot locate DNS info for database server \'%s\'', $server);
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue