1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Added throttling to password reset requests

This commit is contained in:
Dan Brown
2021-10-08 23:19:37 +01:00
parent 543ea6ef71
commit ca764caf2d
3 changed files with 18 additions and 1 deletions

View File

@ -56,7 +56,7 @@ class ForgotPasswordController extends Controller
$this->logActivity(ActivityType::AUTH_PASSWORD_RESET, $request->get('email'));
}
if ($response === Password::RESET_LINK_SENT || $response === Password::INVALID_USER) {
if (in_array($response, [Password::RESET_LINK_SENT, Password::INVALID_USER, Password::RESET_THROTTLED])) {
$message = trans('auth.reset_password_sent', ['email' => $request->get('email')]);
$this->showSuccessNotification($message);