浏览代码

[Web] use correct user to fetch TFA authenticators

FreddleSpl0it 1 年之前
父节点
当前提交
f33d82ffc1
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      data/web/inc/functions.inc.php

+ 1 - 1
data/web/inc/functions.inc.php

@@ -1560,7 +1560,7 @@ function unset_tfa_key($_data) {
 }
 }
 function get_tfa($username = null, $id = null) {
 function get_tfa($username = null, $id = null) {
   global $pdo;
   global $pdo;
-  if (isset($_SESSION['mailcow_cc_username'])) {
+  if (empty($username) && isset($_SESSION['mailcow_cc_username'])) {
     $username = $_SESSION['mailcow_cc_username'];
     $username = $_SESSION['mailcow_cc_username'];
   }
   }
   elseif (empty($username)) {
   elseif (empty($username)) {