Merge pull request #5976 from mailcow/fix/get-tfa

2024-07 fixes
This commit is contained in:
FreddleSpl0it 2024-08-01 11:04:04 +02:00 committed by GitHub
commit cbca306fc1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 3 deletions

View File

@ -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)) {

View File

@ -397,7 +397,10 @@ jQuery(function($){
{ {
title: lang.host, title: lang.host,
data: 'hostname', data: 'hostname',
defaultContent: '' defaultContent: '',
render: function (data, type) {
return escapeHtml(data);
}
}, },
{ {
title: lang.username, title: lang.username,

View File

@ -325,7 +325,10 @@ jQuery(function($){
title: 'URI', title: 'URI',
data: 'uri', data: 'uri',
defaultContent: '', defaultContent: '',
className: 'dtr-col-md dtr-break-all' className: 'dtr-col-md dtr-break-all',
render: function (data, type) {
return escapeHtml(data);
}
}, },
{ {
title: 'Method', title: 'Method',