allow 'localhost' or any local-hostname for db-connection
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -264,7 +264,7 @@ class Database {
|
||||
'charset' => 'utf8'
|
||||
);
|
||||
|
||||
if (!validateDomain($host) && !validate_ip2($host, true, 'invalidip', true)) {
|
||||
if (!validateLocalHostname($host) && !validate_ip2($host, true, 'invalidip', true)) {
|
||||
$dbconf["dsn"]['unix_socket'] = makeCorrectFile($host);
|
||||
} else {
|
||||
$dbconf["dsn"]['host'] = $host;
|
||||
|
||||
Reference in New Issue
Block a user