1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Prevented auto-login from direct email confirmation actions

Was done for convenience but could potentially be exploited by an
attacker using signing up via one of these routes, then forwarding
an email confirmation to another user so they unknowingly utilise
an account someone else controls.

Tweaks the flow of confirming email, and the user invite flow.

For #3050
This commit is contained in:
Dan Brown
2021-11-15 10:50:28 +00:00
parent e29d03ae76
commit 88e6f93abf
5 changed files with 9 additions and 14 deletions

View File

@ -79,9 +79,8 @@ class ConfirmEmailController extends Controller
$this->emailConfirmationService->deleteByUser($user);
$this->showSuccessNotification(trans('auth.email_confirm_success'));
$this->loginService->login($user, auth()->getDefaultDriver());
return redirect('/');
return redirect('/login');
}
/**