Merge pull request #10180 from snipe/fixes/add_rate_limiting_to_forgotten_password

Throttle password reset requests to 5 every 60 seconds
This commit is contained in:
snipe 2021-10-08 15:44:43 -07:00 committed by GitHub
commit c4856c8aed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,6 +29,7 @@ class ForgotPasswordController extends Controller
public function __construct()
{
$this->middleware('guest');
$this->middleware('throttle:1,1', ['except' => 'showLinkRequestForm']);
}
/**
@ -71,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 {