Revert "[stable12] Only allow colons in db host for IPv6 addresses"

This commit is contained in:
Morris Jobke 2017-11-08 00:42:34 +01:00 committed by GitHub
parent 4d117a5e23
commit e97a58793d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 16 deletions

View 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');
}