Skip to content

Commit

Permalink
[IM] Make response to forgotten password generic [ref: 055-9-8]
Browse files Browse the repository at this point in the history
Helps prevent username enumeration attacks.
  • Loading branch information
barryo committed Oct 21, 2022
1 parent bc9b14c commit 04fe7d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Http/Controllers/Auth/ForgotPasswordController.php
Expand Up @@ -130,7 +130,7 @@ public function sendResetLinkEmail( Request $r ): RedirectResponse
*/
protected function sendResetLinkResponse(): RedirectResponse
{
AlertContainer::push( 'The reset link has been sent to your email address.', Alert::SUCCESS );
AlertContainer::push( 'If your email matches user(s) on the system, then an email listing those users has been sent to you.', Alert::INFO );
return redirect( route( 'login@login' ) );
}

Expand All @@ -141,7 +141,7 @@ protected function sendResetLinkResponse(): RedirectResponse
*/
protected function sendResetLinkFailedResponse(): RedirectResponse
{
AlertContainer::push( "We can't find a user with that username" , Alert::DANGER );
AlertContainer::push( "If your email matches user(s) on the system, then an email listing those users has been sent to you." , Alert::INFO );
return back();
}

Expand Down Expand Up @@ -170,7 +170,7 @@ public function sendUsernameEmail( ForgotUsernameRequest $r ) : RedirectResponse
event( new ForgotUsernameEvent( $users, $r->email ) );
}

AlertContainer::push( 'If your email matches user(s) on the system, then an email listing those users has been sent to you.', Alert::SUCCESS );
AlertContainer::push( 'If your email matches user(s) on the system, then an email listing those users has been sent to you.', Alert::INFO );
return Redirect::to( route( "login@showForm" ));
}
}

0 comments on commit 04fe7d8

Please sign in to comment.