aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/lib/SetupChecks/BruteForceThrottler.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/settings/lib/SetupChecks/BruteForceThrottler.php')
-rw-r--r--apps/settings/lib/SetupChecks/BruteForceThrottler.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/apps/settings/lib/SetupChecks/BruteForceThrottler.php b/apps/settings/lib/SetupChecks/BruteForceThrottler.php
index 6c1efd56bc1..3fbdf2d788a 100644
--- a/apps/settings/lib/SetupChecks/BruteForceThrottler.php
+++ b/apps/settings/lib/SetupChecks/BruteForceThrottler.php
@@ -53,17 +53,21 @@ class BruteForceThrottler implements ISetupCheck {
public function run(): SetupResult {
$address = $this->request->getRemoteAddress();
if ($address === '') {
- return SetupResult::info(
- $this->l10n->t('Your remote address could not be determined.')
- );
+ if (\OC::$CLI) {
+ /* We were called from CLI */
+ return SetupResult::info($this->l10n->t('Your remote address could not be determined.'));
+ } else {
+ /* Should never happen */
+ return SetupResult::error($this->l10n->t('Your remote address could not be determined.'));
+ }
} 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])
);
}
}