mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 14:23:17 -04:00
Reset BFP for sudo action
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
This commit is contained in:
parent
d56b1c28ba
commit
c2393fb712
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