From e97a58793d673604a141464505bedf6ef940f553 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Wed, 8 Nov 2017 00:42:34 +0100 Subject: [PATCH] Revert "[stable12] Only allow colons in db host for IPv6 addresses" --- lib/private/Setup.php | 16 ---------------- 1 file changed, 16 deletions(-) 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'); } -- 2.39.5