File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
app/Http/Controllers/Auth Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -33,19 +33,13 @@ public function store(Request $request): RedirectResponse
3333 'email ' => 'required|email ' ,
3434 ]);
3535
36- // We will send the password reset link to this user. Once we have attempted
37- // to send the link, we will examine the response then see the message we
38- // need to show to the user. Finally, we'll send out a proper response.
39- $ status = Password::sendResetLink (
36+ // We will send the password reset link to this user if the email exists
37+ Password::sendResetLink (
4038 $ request ->only ('email ' )
4139 );
4240
43- if ($ status == Password::ResetLinkSent) {
44- return back ()->with ('status ' , __ ($ status ));
45- }
46-
47- throw ValidationException::withMessages ([
48- 'email ' => [trans ($ status )],
49- ]);
41+ // We want to always return a 200 response, even if the user is not found. This is a
42+ // security measure to prevent email accounts from being discovered
43+ return back ()->with ('status ' , __ ('If that email exists in our system, a reset link was sent. ' ));
5044 }
5145}
You can’t perform that action at this time.
0 commit comments