소스 검색

[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) {
   global $pdo;
-  if (isset($_SESSION['mailcow_cc_username'])) {
+  if (empty($username) && isset($_SESSION['mailcow_cc_username'])) {
     $username = $_SESSION['mailcow_cc_username'];
   }
   elseif (empty($username)) {