From 702791210e14f31aea2bc06d61a3d0457d21b03f Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 8 Oct 2021 14:26:30 -0700 Subject: [PATCH 1/2] Throttle password reset requests to 5 every 60 seconds Signed-off-by: snipe --- app/Http/Controllers/Auth/ForgotPasswordController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php index 7c0348c19..1a3d12089 100644 --- a/app/Http/Controllers/Auth/ForgotPasswordController.php +++ b/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -29,6 +29,7 @@ class ForgotPasswordController extends Controller public function __construct() { $this->middleware('guest'); + $this->middleware('throttle:5,60', ['except' => 'showLinkRequestForm']); } /** From 0674ef5a3da62c2a0d212f34894f16e015d7c7cd Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 8 Oct 2021 15:43:32 -0700 Subject: [PATCH 2/2] Fixed number to 1 (for minutes) Signed-off-by: snipe --- app/Http/Controllers/Auth/ForgotPasswordController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php index 1a3d12089..e886eb669 100644 --- a/app/Http/Controllers/Auth/ForgotPasswordController.php +++ b/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -29,7 +29,7 @@ class ForgotPasswordController extends Controller public function __construct() { $this->middleware('guest'); - $this->middleware('throttle:5,60', ['except' => 'showLinkRequestForm']); + $this->middleware('throttle:1,1', ['except' => 'showLinkRequestForm']); } /** @@ -72,7 +72,7 @@ class ForgotPasswordController extends Controller * Once we have attempted to send the link, we will examine the response * then see the message we need to show to the user. Finally, we'll send out a proper response. */ - + $response = null; try {