[VS] Fix no discrepancy string position in report email

This commit is contained in:
Nicolo Maio 2023-12-19 16:17:52 +01:00
parent 16010e01e7
commit 97c990c6cb

View file

@ -1758,13 +1758,18 @@ function vs_utils.notify_scan_results(exec_type, periodicity)
end
end
local no_discrepancy = false
if ((not email_info.has_discrepancy) and email_info.no_longer_down_now == 0 and not discovered_hosts) then
add_br = "<br>"
no_discrepancy = true
possible_discrepancies_info = i18n("hosts_stats.page_scan_hosts.email.no_discrepancy")
end
notification_message = notification_message .. possible_discrepancies_info .. no_longer_down_now .. net_scan_without_hosts_discovered .. discovered_hosts_list
if (not no_discrepancy) then
notification_message = notification_message .. possible_discrepancies_info .. no_longer_down_now .. net_scan_without_hosts_discovered .. discovered_hosts_list
else
notification_message = notification_message .. no_longer_down_now .. net_scan_without_hosts_discovered .. discovered_hosts_list .. possible_discrepancies_info
end
local report_link_line = i18n("hosts_stats.page_scan_hosts.email.report_link_line",
{url = string.format(getHttpHost() .. ntop.getHttpPrefix() .. "/lua/enterprise/vulnerability_scan_report.lua?epoch_end=%u&epoch_begin=%u",
report_date,report_date), add_br = add_br})