]> source.dussan.org Git - nextcloud-server.git/commitdiff
Revert "[stable12] Only allow colons in db host for IPv6 addresses" 7102/head
authorMorris Jobke <hey@morrisjobke.de>
Tue, 7 Nov 2017 23:42:34 +0000 (00:42 +0100)
committerGitHub <noreply@github.com>
Tue, 7 Nov 2017 23:42:34 +0000 (00:42 +0100)
lib/private/Setup.php

index 2876ad524f942d7ef84b213c9cd315202a1ac2b2..b8a861fd296304df88c2369b61ef4931cb1fc2be 100644 (file)
@@ -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');
        }