diff --git a/scripts/lua/iface_ports_list.lua b/scripts/lua/iface_ports_list.lua index a5285c9ab4..a019e1db52 100644 --- a/scripts/lua/iface_ports_list.lua +++ b/scripts/lua/iface_ports_list.lua @@ -29,12 +29,9 @@ function fill_ports_array(field_key, flows_stats, host) end if (host == nil) then - flows_stats = interface.queryFlowsInfo("SELECT PORTS FROM FLOWS") + flows_stats,total = aggregateFlowsStats(interface.getFlowsInfo()) else - host_table = hostkey2hostinfo(host) - host = host_table["host"] - vlan = host_table["vlan"] or 0 - flows_stats = interface.queryFlowsInfo("SELECT PORTS FROM FLOWS WHERE host = "..host.." AND vlan = "..tostring(vlan)) + flows_stats,total = aggregateFlowsStats(interface.getFlowsInfo(host)) end client_ports = fill_ports_array("cli", flows_stats, host) server_ports = fill_ports_array("srv", flows_stats, host) diff --git a/src/Lua.cpp b/src/Lua.cpp index 1248d5dffc..3350b0fbe3 100644 --- a/src/Lua.cpp +++ b/src/Lua.cpp @@ -4552,7 +4552,7 @@ void Lua::purifyHTTPParameter(char *param) { break; default: - ntop->getTrace()->traceEvent(TRACE_WARNING, "Discarded char '%c' in URI", c); + ntop->getTrace()->traceEvent(TRACE_WARNING, "Discarded char '%c' in URI [%s]", c, param); ampercent[0] = '\0'; return; } diff --git a/src/Utils.cpp b/src/Utils.cpp index 15f8534b42..bce1f9e79d 100755 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -660,6 +660,7 @@ bool Utils::isUserAdministrator(lua_State* vm) { */ void Utils::purifyHTTPparam(char *param, bool strict) { +#if 1 xsslibUrl url; /* Fix for http://packetstormsecurity.com/files/127329/Ntop-NG-1.1-Cross-Site-Scripting.html */ @@ -670,9 +671,7 @@ void Utils::purifyHTTPparam(char *param, bool strict) { ntop->getTrace()->traceEvent(TRACE_WARNING, "Found possible XSS attempt: %s", param); param[0] = '\0'; } - - -#if 0 +#else for(int i=0; param[i] != '\0'; i++) { bool is_good;