mirror of
https://github.com/nextcloud/server.git
synced 2026-06-13 10:40:40 -04:00
Merge pull request #41177 from nextcloud/fix/noid/reset-bfp-on-sudo-action
Reset BFP for sudo action
This commit is contained in:
commit
f72ec9e246
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue