mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 13:44:06 -08:00
Merge pull request #12221 from snipe/fixes/throttles_reset_password_form
Add throttle for password reset form
This commit is contained in:
commit
775df0ab60
|
@ -41,6 +41,7 @@ class ResetPasswordController extends Controller
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->middleware('guest');
|
$this->middleware('guest');
|
||||||
|
$this->middleware('throttle:10,1');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function rules()
|
protected function rules()
|
||||||
|
@ -116,7 +117,7 @@ class ResetPasswordController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
\Log::debug('Password reset for '.$user->username.' FAILED - this user exists but the token is not valid');
|
\Log::debug('Password reset for '.$user->username.' FAILED - this user exists but the token is not valid');
|
||||||
return redirect()->back()->withInput($request->only('email'))->with('error', trans('passwords.token'));
|
return redirect()->back()->withInput($request->only('email'))->with('success', trans('passwords.reset'));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue