[VS] Add IPv6 badge on alert description.

This commit is contained in:
Nicolo Maio 2023-11-13 14:51:34 +01:00
parent 9e3adc817f
commit 2083ea6cb9

View file

@ -107,6 +107,10 @@ function alert_vulnerability_scan.format(ifid, alert, alert_type_params, local_e
local host = alert_type_params.host_name
if isEmptyString(host) then
host = alert_type_params.host
else
if (not isIPv4(alert_type_params.host)) then
host = string.format("%s <span class=\"badge bg-secondary\">%s</span>",host,i18n('ipv6'))
end
end
local scan_type = alert_type_params.scan_type