Skip to content

Commit c3a6874

Browse files
committed
Add throttle for password reset form
Signed-off-by: snipe <[email protected]>
1 parent b7a5467 commit c3a6874

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/Http/Controllers/Auth/ResetPasswordController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class ResetPasswordController extends Controller
4141
public function __construct()
4242
{
4343
$this->middleware('guest');
44+
$this->middleware('throttle:10,1');
4445
}
4546

4647
protected function rules()
@@ -116,7 +117,7 @@ public function reset(Request $request)
116117
}
117118

118119
\Log::debug('Password reset for '.$user->username.' FAILED - this user exists but the token is not valid');
119-
return redirect()->back()->withInput($request->only('email'))->with('error', trans('passwords.token'));
120+
return redirect()->back()->withInput($request->only('email'))->with('success', trans('passwords.reset'));
120121

121122
}
122123

0 commit comments

Comments
 (0)