mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Return error if token is incorrect
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
b00db3cc56
commit
a5b857c753
|
@ -61,6 +61,14 @@ class ResetPasswordController extends Controller
|
|||
|
||||
public function showResetForm(Request $request, $token = null)
|
||||
{
|
||||
|
||||
$credentials = $request->only('email', 'token');
|
||||
|
||||
if (is_null($this->broker()->getUser($credentials))) {
|
||||
\Log::debug('Password reset form FAILED - this token is not valid.');
|
||||
return redirect()->route('password.request')->with('error', trans('passwords.token'));
|
||||
}
|
||||
|
||||
return view('auth.passwords.reset')->with(
|
||||
[
|
||||
'token' => $token,
|
||||
|
|
Loading…
Reference in a new issue