Workaround to handle \n forcefully set when decoding ZMQ tlv

This commit is contained in:
Simone Mainardi 2019-07-31 16:06:15 +02:00
parent 444916fa14
commit c9223590d9
4 changed files with 32 additions and 17 deletions

View file

@ -1440,7 +1440,7 @@ function flowinfo2hostname(flow_info, host_type, alerts_view)
end
if(host_type == "srv") then
if(flow_info["host_server_name"] ~= nil and flow_info["host_server_name"] ~= "") then
if flow_info["host_server_name"] ~= nil and flow_info["host_server_name"] ~= "" and flow_info["host_server_name"]:match("%w") then
-- remove possible ports from the name
return(flow_info["host_server_name"]:gsub(":%d+$", ""))
end