diff options
author | Joas Schilling <coding@schilljs.com> | 2023-03-30 15:02:51 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2023-05-03 22:43:36 +0200 |
commit | b91957e3df058b5d22b9d2bb7c0e464749e4e22d (patch) | |
tree | a1927cb13763b90d1b9fedac607802fb7fc3d5b3 /lib/private/User | |
parent | df5283ad05f8ffa1a0fe979429746ca071a54326 (diff) | |
download | nextcloud-server-b91957e3df058b5d22b9d2bb7c0e464749e4e22d.tar.gz nextcloud-server-b91957e3df058b5d22b9d2bb7c0e464749e4e22d.zip |
fix(dav): Abort requests with 429 instead of waiting
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/User')
-rw-r--r-- | lib/private/User/Session.php | 4 |
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'); } } |