From 8a1136d80ab96c5fcc29339e0e763186de6617d9 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 8 Oct 2020 18:43:39 -0700 Subject: [PATCH] Use password security settings on password reset --- app/Http/Controllers/Auth/ResetPasswordController.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php index 540abc1f30..bfcf88eec4 100644 --- a/app/Http/Controllers/Auth/ResetPasswordController.php +++ b/app/Http/Controllers/Auth/ResetPasswordController.php @@ -3,6 +3,7 @@ namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; +use App\Models\Setting; use Illuminate\Foundation\Auth\ResetsPasswords; use Illuminate\Http\Request; @@ -43,7 +44,7 @@ class ResetPasswordController extends Controller return [ 'token' => 'required', 'username' => 'required', - 'password' => 'required|confirmed|min:6', + 'password' => 'required|confirmed|'.Setting::passwordComplexityRulesSaving('update'), ]; } @@ -59,14 +60,17 @@ class ResetPasswordController extends Controller public function showResetForm(Request $request, $token = null) { return view('auth.passwords.reset')->with( - ['token' => $token, 'username' => $request->input('username')] + [ + 'token' => $token, + 'username' => $request->input('username') + ] ); } protected function sendResetFailedResponse(Request $request, $response) { return redirect()->back() - ->withInput(['username'=>$request->input('username')]) + ->withInput(['username'=> $request->input('username')]) ->withErrors(['username' => trans($response)]); }