Merge pull request #7107 from nextcloud/revert-6645
Revert "Only allow colons in db host for IPv6 addresses"
This commit is contained in:
commit
5651fdf10c
|
@ -295,10 +295,6 @@ class Setup {
|
||||||
$error[] = $l->t("Can't create or write into the data directory %s", array($dataDir));
|
$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 (!empty($error)) {
|
if (!empty($error)) {
|
||||||
return $error;
|
return $error;
|
||||||
}
|
}
|
||||||
|
@ -416,18 +412,6 @@ class Setup {
|
||||||
return $error;
|
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() {
|
public static function installBackgroundJobs() {
|
||||||
$jobList = \OC::$server->getJobList();
|
$jobList = \OC::$server->getJobList();
|
||||||
$jobList->add(DefaultTokenCleanupJob::class);
|
$jobList->add(DefaultTokenCleanupJob::class);
|
||||||
|
|
Loading…
Reference in New Issue