Fix logout link on 2FA verification page

This commit is contained in:
dx7 2020-07-10 01:32:45 -03:00
parent 45c9ce5eb0
commit f3dba54179
No known key found for this signature in database
GPG key ID: 3E85E7873311DF48

View file

@ -21,7 +21,7 @@ class TwoFactorAuth
$enabled = (bool) $user->{'2fa_enabled'};
if($enabled != false) {
$checkpoint = 'i/auth/checkpoint';
if($request->session()->has('2fa.session.active') !== true && !$request->is($checkpoint))
if($request->session()->has('2fa.session.active') !== true && !$request->is($checkpoint) && !$request->is('logout'))
{
return redirect('/i/auth/checkpoint');
} elseif($request->session()->has('2fa.attempts') && (int) $request->session()->get('2fa.attempts') > 3) {