Skip to content

Commit cbca306

Browse files
Merge pull request #5976 from mailcow/fix/get-tfa
2024-07 fixes
2 parents 6a8986f + efb2572 commit cbca306

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

data/web/inc/functions.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1560,7 +1560,7 @@ function unset_tfa_key($_data) {
15601560
}
15611561
function get_tfa($username = null, $id = null) {
15621562
global $pdo;
1563-
if (isset($_SESSION['mailcow_cc_username'])) {
1563+
if (empty($username) && isset($_SESSION['mailcow_cc_username'])) {
15641564
$username = $_SESSION['mailcow_cc_username'];
15651565
}
15661566
elseif (empty($username)) {

data/web/js/site/admin.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,10 @@ jQuery(function($){
397397
{
398398
title: lang.host,
399399
data: 'hostname',
400-
defaultContent: ''
400+
defaultContent: '',
401+
render: function (data, type) {
402+
return escapeHtml(data);
403+
}
401404
},
402405
{
403406
title: lang.username,

data/web/js/site/debug.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,10 @@ jQuery(function($){
325325
title: 'URI',
326326
data: 'uri',
327327
defaultContent: '',
328-
className: 'dtr-col-md dtr-break-all'
328+
className: 'dtr-col-md dtr-break-all',
329+
render: function (data, type) {
330+
return escapeHtml(data);
331+
}
329332
},
330333
{
331334
title: 'Method',

0 commit comments

Comments
 (0)