aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/User/Session.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/User/Session.php')
-rw-r--r--lib/private/User/Session.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php
index 078539e5489..6273945ec43 100644
--- a/lib/private/User/Session.php
+++ b/lib/private/User/Session.php
@@ -428,7 +428,7 @@ class Session implements IUserSession, Emitter {
IRequest $request,
OC\Security\Bruteforce\Throttler $throttler) {
$remoteAddress = $request->getRemoteAddress();
- $currentDelay = $throttler->sleepDelay($remoteAddress, 'login');
+ $currentDelay = $throttler->sleepDelayOrThrowOnMax($remoteAddress, 'login');
if ($this->manager instanceof PublicEmitter) {
$this->manager->emit('\OC\User', 'preLogin', [$user, $password]);
@@ -479,7 +479,7 @@ class Session implements IUserSession, Emitter {
$this->dispatcher->dispatchTyped(new OC\Authentication\Events\LoginFailed($user, $password));
if ($currentDelay === 0) {
- $throttler->sleepDelay($remoteAddress, 'login');
+ $throttler->sleepDelayOrThrowOnMax($remoteAddress, 'login');
}
}