From a81dc4028b418c0374bbdb56583b40472dbe8693 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sun, 14 Mar 2010 03:06:19 +0000 Subject: net.xmppcomponent_listener: Log invalid XML received from components (as we already do for c2s/s2s) --- net/xmppcomponent_listener.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/net/xmppcomponent_listener.lua b/net/xmppcomponent_listener.lua index c9a0d70b..7b8ab95a 100644 --- a/net/xmppcomponent_listener.lua +++ b/net/xmppcomponent_listener.lua @@ -164,6 +164,7 @@ function component_listener.onincoming(conn, data) function session.data(conn, data) local ok, err = parser:parse(data); if ok then return; end + log("debug", "Received invalid XML (%s) %d bytes: %s", tostring(err), #data, data:sub(1, 300):gsub("[\r\n]+", " "):gsub("[%z\1-\31]", "_")); session:close("xml-not-well-formed"); end -- cgit v1.2.3