Skip to content

TLS reports #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
f2d15aa
Update core.js
RvdHout May 2, 2021
fbe8023
Update hm_account.php
RvdHout May 2, 2021
66d6364
Update core.js
RvdHout May 3, 2021
d28a384
Additions
RvdHout Oct 8, 2021
26d14ac
webadmin 5.6.9-B2602.53
RvdHout Dec 19, 2022
d745b72
Update background_login.php
kimboslice99 Dec 20, 2022
962f46f
Update core.css
kimboslice99 Dec 20, 2022
154e96d
Update core.css
RvdHout Dec 24, 2022
c35a0d9
Update hm_imap.php
RvdHout Dec 26, 2022
e1c0c4e
Update hm_imap.php
RvdHout Dec 27, 2022
d6ff172
Add TLS report handling
kimboslice99 Feb 5, 2024
0aa85d8
oops
kimboslice99 Feb 5, 2024
f0e45e6
Revert "oops"
kimboslice99 Feb 5, 2024
1dd64a9
Update hm_tlsreports.php
kimboslice99 Feb 5, 2024
c6efb8e
doh!
kimboslice99 Feb 5, 2024
d954140
Update hm_tlsreports.php
kimboslice99 Feb 5, 2024
ece1f6d
Update english.php
kimboslice99 Feb 5, 2024
527497d
failure details
kimboslice99 Feb 5, 2024
92a5d7a
update treemenu
kimboslice99 Feb 5, 2024
49ce68c
Update hm_tlsreports.php
kimboslice99 Feb 5, 2024
ef89080
nearly satisfied
kimboslice99 Feb 6, 2024
b9bdfde
add domain to array
kimboslice99 Feb 6, 2024
f272671
Update hm_tlsreports.php
kimboslice99 Feb 6, 2024
ac33a04
parse dates
kimboslice99 Feb 6, 2024
29f1eca
Merge remote-tracking branch 'upstream/master'
kimboslice99 Feb 6, 2024
d19209e
Update index.php
kimboslice99 Feb 6, 2024
91b0fad
Update functions.php
kimboslice99 Feb 6, 2024
dddaac3
sort by date
kimboslice99 Feb 8, 2024
2a2c962
Update core.css
kimboslice99 Feb 22, 2024
15138aa
Update core.css
kimboslice99 Mar 8, 2024
dbb810a
Merge remote-tracking branch 'upstream/master'
kimboslice99 Jan 14, 2025
3fa221a
Update hm_tlsreports.php
kimboslice99 Jan 14, 2025
4e30041
Update hm_distributionlist.php
kimboslice99 Jan 14, 2025
4196c4a
Update hm_tlsreports.php
kimboslice99 Jan 14, 2025
55f1393
Update english.php
kimboslice99 Jan 14, 2025
da688f6
Update hm_tlsreports.php
kimboslice99 Jan 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions hMailAdmin/hm_tlsreports.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

if (empty($hmail_config['tlsreport_enable'])) exit('<div class="box large"><h2>' . Translate("TLS reports") . '</h2><p class="warning" style="margin-top:18px;">' . Translate("TLS reports are not enabled in config.php") . '</p></div>') . PHP_EOL;

$folder = './logs/tls';
$folder = './logs/tls/';

function get_reports($folder) {
global $hmail_config;
Expand Down Expand Up @@ -113,7 +113,7 @@ function save_json_attachment($inbox, $email_number, $part, $index, $folder) {


/* Search directory for reports. */
$new_report_count = get_reports();
$new_report_count = get_reports($folder);
$files = glob($folder . '*.json');
$reports_count = count($files);
if (!empty($files)) $reports = parse($files);
Expand Down Expand Up @@ -183,6 +183,7 @@ function parse($files){
<div class="box large">
<h2><?php EchoTranslation("TLS reports") ?> <span>(<?php echo $reports_count ?>)</span></h2>
<?php
$message = '';
if (!empty($new_report_count)) {
if (is_int($new_report_count)) {
$message = str_replace('#', $new_report_count, Translate('# new reports added.'));
Expand All @@ -193,9 +194,11 @@ function parse($files){
if (empty($reports))
$message = 'No reports.';
}
if ($message) {
?>
<p class="warning" style="margin-top:18px;"><?php echo Translate($message); ?></p>
<?php
}
$id = 0;
foreach( $reports as $report ) {
echo '<h3><a href="#">'.$report['domain'].' &#8211; '.$report['org'].' &#8211; '.date('Y-m-d', strtotime($report['date-range']['date-begin'])).'</a></h3>';
Expand Down
3 changes: 2 additions & 1 deletion hMailAdmin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
header('X-Content-Type-Options: nosniff');
header('X-Frame-Options: DENY');
header('Content-Security-Policy: default-src \'none\'; script-src \'self\' \'unsafe-inline\'; connect-src \'self\'; img-src \'self\'; style-src \'self\' \'unsafe-inline\'; font-src \'self\' \'unsafe-inline\';');
header('X-XSS-Protection: 1; mode=block');
// https://github.com/OWASP/CheatSheetSeries/issues/376
header('X-XSS-Protection: 0');

if (!file_exists("config.php")) {
echo "Please rename config-dist.php to config.php. The file is found in the hMailAdmin root folder.";
Expand Down