From f3dba54179d2413d7efa22edf6a2e0aeb193a359 Mon Sep 17 00:00:00 2001 From: dx7 Date: Fri, 10 Jul 2020 01:32:45 -0300 Subject: [PATCH 1/2] Fix logout link on 2FA verification page --- app/Http/Middleware/TwoFactorAuth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Middleware/TwoFactorAuth.php b/app/Http/Middleware/TwoFactorAuth.php index b59b2c31f..ff3244575 100644 --- a/app/Http/Middleware/TwoFactorAuth.php +++ b/app/Http/Middleware/TwoFactorAuth.php @@ -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) { From 49bab56438ae66cba67315010b660db8c3f9ae57 Mon Sep 17 00:00:00 2001 From: dx7 Date: Sun, 26 Jul 2020 01:40:35 -0300 Subject: [PATCH 2/2] Remove a useless link on 2FA verification page --- resources/views/auth/checkpoint.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/auth/checkpoint.blade.php b/resources/views/auth/checkpoint.blade.php index 2c78bbd3d..1c84e8e2a 100644 --- a/resources/views/auth/checkpoint.blade.php +++ b/resources/views/auth/checkpoint.blade.php @@ -41,7 +41,7 @@
- Logged in as: {{Auth::user()->username}} + Logged in as: {{Auth::user()->username}} Logout