Return error if token is incorrect

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2022-06-21 19:30:51 -07:00
parent b00db3cc56
commit a5b857c753

View file

@ -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,