diff --git a/inc/inc.Authentication.php b/inc/inc.Authentication.php index 2ee7bbbc6..45153fb2d 100644 --- a/inc/inc.Authentication.php +++ b/inc/inc.Authentication.php @@ -144,7 +144,7 @@ if (!$user->isAdmin() && $origuser == null) { * already on the page Setup2Factor.php and no user substiation has occured. */ if($settings->_enable2FactorAuthentication && $settings->_guestID != $user->getID() && $settings->_autoLoginUser != $user->getID() && $origuser == null && $user->getSecret() == '') { - if(basename($_SERVER['SCRIPT_NAME']) != 'out.Setup2Factor.php' && basename($_SERVER['SCRIPT_NAME']) != 'op.Setup2Factor.php') { + if(!in_array(basename($_SERVER['SCRIPT_NAME']), ['out.Setup2Factor.php', 'op.Setup2Factor.php', 'op.Logout.php'])) { header("Location: ../out/out.Setup2Factor.php"); exit; }