mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
Fix tests for setupchecks
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
1f4e0927ba
commit
ad372869bc
3 changed files with 4 additions and 4 deletions
|
|
@ -62,12 +62,12 @@ class BruteForceThrottler implements ISetupCheck {
|
|||
}
|
||||
} elseif ($this->throttler->showBruteforceWarning($address)) {
|
||||
return SetupResult::error(
|
||||
$this->l10n->t('Your remote address was identified as "%s" and is bruteforce throttled at the moment slowing down the performance of various requests. If the remote address is not your address this can be an indication that a proxy is not configured correctly.', $address),
|
||||
$this->l10n->t('Your remote address was identified as "%s" and is bruteforce throttled at the moment slowing down the performance of various requests. If the remote address is not your address this can be an indication that a proxy is not configured correctly.', [$address]),
|
||||
$this->urlGenerator->linkToDocs('admin-reverse-proxy')
|
||||
);
|
||||
} else {
|
||||
return SetupResult::success(
|
||||
$this->l10n->t('Your remote address "%s" is not bruteforce throttled.', $address)
|
||||
$this->l10n->t('Your remote address "%s" is not bruteforce throttled.', [$address])
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ class ForwardedForHeaders implements ISetupCheck {
|
|||
if (\in_array($remoteAddress, $trustedProxies, true) && ($remoteAddress !== '127.0.0.1')) {
|
||||
if ($remoteAddress !== $detectedRemoteAddress) {
|
||||
/* Remote address was successfuly fixed */
|
||||
return SetupResult::success($this->l10n->t('Your IP address was resolved as %s', $detectedRemoteAddress));
|
||||
return SetupResult::success($this->l10n->t('Your IP address was resolved as %s', [$detectedRemoteAddress]));
|
||||
} else {
|
||||
return SetupResult::warning(
|
||||
$this->l10n->t('The reverse proxy header configuration is incorrect, or you are accessing Nextcloud from a trusted proxy. If not, this is a security issue and can allow an attacker to spoof their IP address as visible to the Nextcloud.'),
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ class ForwardedForHeadersTest extends TestCase {
|
|||
->willReturn('1.1.1.1');
|
||||
|
||||
$this->assertEquals(
|
||||
SetupResult::WARNING,
|
||||
SetupResult::ERROR,
|
||||
$this->check->run()->getSeverity()
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue