Software /
code /
prosody
Changeset
2758:0476a662dacc
net.xmppcomponent_listener: Log invalid XML received from components (as we already do for c2s/s2s)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 14 Mar 2010 03:06:19 +0000 |
parents | 2757:c13816e0c546 |
children | 2759:48e8832e5cab |
files | net/xmppcomponent_listener.lua |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/net/xmppcomponent_listener.lua Sun Mar 14 03:05:43 2010 +0000 +++ b/net/xmppcomponent_listener.lua Sun Mar 14 03:06:19 2010 +0000 @@ -164,6 +164,7 @@ 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