浏览代码

Authentication - TOTP: Updatse for PHP 8.1

fusionate 2 年之前
父节点
当前提交
5a5b4f6872
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      core/authentication/resources/classes/plugins/totp.php

+ 1 - 1
core/authentication/resources/classes/plugins/totp.php

@@ -177,7 +177,7 @@ class plugin_totp {
 				$view->assign("button_cancel", $text['button-cancel']);
 				$view->assign("button_cancel", $text['button-cancel']);
 
 
 				//show the views
 				//show the views
-				if ($_SESSION['authentication']['plugin']['database']['authorized'] && empty($this->user_totp_secret)) {
+				if (!empty($_SESSION['authentication']['plugin']['database']['authorized']) && empty($this->user_totp_secret)) {
 
 
 					//create the totp secret
 					//create the totp secret
 					$base32 = new base2n(5, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', FALSE, TRUE, TRUE);
 					$base32 = new base2n(5, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', FALSE, TRUE, TRUE);