From 67e60db16a1b69b96e19732e342ca7f1dc0b2adf Mon Sep 17 00:00:00 2001 From: fusionate Date: Fri, 23 Jun 2023 16:53:09 +0000 Subject: [PATCH] Authentication - TOTP: Updatse for PHP 8.1 --- core/authentication/resources/classes/plugins/totp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/authentication/resources/classes/plugins/totp.php b/core/authentication/resources/classes/plugins/totp.php index 090204c15d..d8a4294247 100644 --- a/core/authentication/resources/classes/plugins/totp.php +++ b/core/authentication/resources/classes/plugins/totp.php @@ -177,7 +177,7 @@ class plugin_totp { $view->assign("button_cancel", $text['button-cancel']); //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 $base32 = new base2n(5, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', FALSE, TRUE, TRUE);