Skip to content

Commit

Permalink
Fixes missing protocol mapping (#8805)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoBiscosi committed Nov 12, 2024
1 parent b33cd7f commit b2a37ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion scripts/locales/en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ local lang = {
["host_alert_dns_server_contacts"] = "Too many DNS servers contacted by %{entity} [%{value} > %{threshold} servers]",
["host_alert_domain_names_contacts"] = "Too many Domain Names contacted [Threshold: %{threshold}][Contacted: %{contacts}]",
["host_alert_score"] = "Score exceeded by %{entity} [%{value} %{op} %{threshold}]",
["host_alert_server_ports_contacts"] = "%{entity} has been contacted on Port %{value} [Detected Protocol: %{threshold}]",
["host_alert_server_ports_contacts"] = "Host contacted as a Server [Port: %{port}] [Protocol: %{protocol}]",
["host_alert_smtp_server_contacts"] = "Too many SMTP servers contacted by %{entity} [%{value} > %{threshold} servers]",
["host_entity"] = "host %{entity_value}",
["host_log"] = "Log from <a href=\"%{url}\">%{host}</a> (%{facility}) %{line}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ end
-- @return A human-readable string
function host_alert_server_ports_contacts.format(ifid, alert, alert_type_params)
local alert_consts = require("alert_consts")
local entity = alert_consts.formatHostAlert(ifid, alert["ip"], alert["vlan_id"])
local value = alert_type_params.port or 0
local host = alert_consts.formatHostAlert(ifid, alert["ip"], alert["vlan_id"])
local port = alert_type_params.port or 0
local protocol = interface.getnDPIFullProtoName(0, alert_type_params.app_protocol)

return i18n("alert_messages.host_alert_server_ports_contacts", {
entity = entity,
value = value,
threshold = alert_type_params.app_protocol or 0,
port = port,
protocol = protocol,
})
end

Expand Down

0 comments on commit b2a37ea

Please sign in to comment.