From: Morris Jobke Date: Tue, 7 Nov 2017 23:42:34 +0000 (+0100) Subject: Revert "[stable12] Only allow colons in db host for IPv6 addresses" X-Git-Tag: v12.0.4RC1~23^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e97a58793d673604a141464505bedf6ef940f553;p=nextcloud-server.git Revert "[stable12] Only allow colons in db host for IPv6 addresses" --- diff --git a/lib/private/Setup.php b/lib/private/Setup.php index 2876ad524f9..b8a861fd296 100644 --- a/lib/private/Setup.php +++ b/lib/private/Setup.php @@ -294,10 +294,6 @@ class Setup { $error[] = $l->t("Can't create or write into the data directory %s", array($dataDir)); } - if (!$this->validateDatabaseHost($options['dbhost'])) { - $error[] = $l->t('Given database host is invalid and must not contain the port: %s', [$options['dbhost']]); - } - if(count($error) != 0) { return $error; } @@ -413,18 +409,6 @@ class Setup { return $error; } - /** - * @param string $host - * @return bool - */ - protected function validateDatabaseHost($host) { - if (strpos($host, ':') === false) { - return true; - } - - return filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) !== false; - } - public static function installBackgroundJobs() { \OC::$server->getJobList()->add('\OC\Authentication\Token\DefaultTokenCleanupJob'); }