mod_c2s, mod_s2s, mod_component: Log invalid XML escaped (fixes #734)

See 6ed0d6224d64
This commit is contained in:
Kim Alvefur 2019-01-15 20:08:30 +01:00
parent 4b6a1153f4
commit cf984835d1
3 changed files with 3 additions and 4 deletions

View file

@ -310,7 +310,7 @@ function listener.onconnect(conn)
function session.data(_, data)
local ok, err = stream:feed(data);
if ok then return; end
module:log("debug", "Received invalid XML (%s) %d bytes: %s", tostring(err), #data, data:sub(1, 300):gsub("[\r\n]+", " "):gsub("[%z\1-\31]", "_"));
log("debug", "Received invalid XML (%s) %d bytes: %q", tostring(err), #data, data:sub(1, 300));
session:close("not-well-formed");
end