mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2026-11-20 23:43:26 +03:00
Render log records through the default output sanitization path and remove the inline JavaScript interpolation of log data. Full log data remains available through a native details element without placing it in a script context. Refs #1128 thanks @TrapoSAMA
38 lines
1.5 KiB
Smarty
38 lines
1.5 KiB
Smarty
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<form name="frmOverview" method="post" action="">
|
|
{html_options name='fDomain' output=$domain_list values=$domain_list selected=$domain_selected onchange="this.form.submit();"}
|
|
<noscript><input class="button" type="submit" name="go" value="{$PALANG.go}"/></noscript>
|
|
</form>
|
|
</div>
|
|
{if $tLog}
|
|
<div class="panel-body">
|
|
<h4>{$PALANG.pViewlog_welcome|replace:"%s":$CONF.page_size} {$fDomain} </h4>
|
|
</div>
|
|
<table id="log_table" class="table">
|
|
{#tr_header#}
|
|
<th>{$PALANG.pViewlog_timestamp}</th>
|
|
<th>{$PALANG.admin}</th>
|
|
<th>{$PALANG.domain}</th>
|
|
<th>{$PALANG.pViewlog_action}</th>
|
|
<th>{$PALANG.pViewlog_data}</th>
|
|
</tr>
|
|
{foreach from=$tLog item=item}
|
|
{assign var=log_data value=$item.data|truncate:35:"...":true}
|
|
{$smarty.config.tr_hilightoff}
|
|
<td nowrap="nowrap">{$item.timestamp}</td>
|
|
<td nowrap="nowrap">{$item.username}</td>
|
|
<td nowrap="nowrap">{$item.domain}</td>
|
|
<td nowrap="nowrap">{$item.action}</td>
|
|
<td>
|
|
<details>
|
|
<summary>{$log_data}</summary>
|
|
<div class="text-break">{$item.data}</div>
|
|
</details>
|
|
</td>
|
|
</tr>
|
|
{/foreach}
|
|
</table>
|
|
{/if}
|
|
</div>
|