summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2023-10-30 14:27:36 +0100
committerGitHub <noreply@github.com>2023-10-30 14:27:36 +0100
commitf72ec9e2466388b875f5fe1d41df82006e970261 (patch)
treeb72aad80444b368b5538ac0a658d6e65f815e579
parentd0db4d6ecf69fee46da7be513310425fb94c165c (diff)
parentc2393fb7123910eedfcf828eef6ce37ec2c1799f (diff)
downloadnextcloud-server-f72ec9e2466388b875f5fe1d41df82006e970261.tar.gz
nextcloud-server-f72ec9e2466388b875f5fe1d41df82006e970261.zip
Merge pull request #41177 from nextcloud/fix/noid/reset-bfp-on-sudo-action
Reset BFP for sudo action
-rw-r--r--core/Controller/LoginController.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php
index af43f2d4c4a..39ffcc81ac1 100644
--- a/core/Controller/LoginController.php
+++ b/core/Controller/LoginController.php
@@ -360,12 +360,13 @@ class LoginController extends Controller {
$loginResult = $this->userManager->checkPassword($loginName, $password);
if ($loginResult === false) {
$response = new DataResponse([], Http::STATUS_FORBIDDEN);
- $response->throttle();
+ $response->throttle(['loginName' => $loginName]);
return $response;
}
$confirmTimestamp = time();
$this->session->set('last-password-confirm', $confirmTimestamp);
+ $this->throttler->resetDelay($this->request->getRemoteAddress(), 'sudo', ['loginName' => $loginName]);
return new DataResponse(['lastLogin' => $confirmTimestamp], Http::STATUS_OK);
}
}