Merge pull request #2348 from dx7/2FA-page-issues

2FA verification page issues
pull/2354/head
daniel 5 years ago committed by GitHub
commit 8ffad2b615
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

@ -41,7 +41,7 @@
</div> </div>
</div> </div>
<div class="d-flex justify-content-between pt-4 small"> <div class="d-flex justify-content-between pt-4 small">
<a class="text-lighter text-decoration-none" href="/{{Auth::user()->username}}">Logged in as: <span class="font-weight-bold text-muted">{{Auth::user()->username}}</span></a> <span class="text-lighter text-decoration-none">Logged in as: <span class="font-weight-bold text-muted">{{Auth::user()->username}}</span></span>
<span> <span>
<a class="text-decoration-none text-muted font-weight-bold" href="{{ route('logout') }}" onclick="event.preventDefault();document.getElementById('logout-form').submit();">Logout</a> <a class="text-decoration-none text-muted font-weight-bold" href="{{ route('logout') }}" onclick="event.preventDefault();document.getElementById('logout-form').submit();">Logout</a>
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;"> <form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">

Loading…
Cancel
Save