diff options
author | Kim Alvefur <zash@zash.se> | 2019-01-15 20:08:30 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-01-15 20:08:30 +0100 |
commit | cf984835d120a714e2ed4337f8522e935cf85498 (patch) | |
tree | 60b1d5609e8e8956581b16c31a553088e90a967f /plugins/mod_c2s.lua | |
parent | 4b6a1153f46fbb1c14ca7a67cc82701572227811 (diff) | |
download | prosody-cf984835d120a714e2ed4337f8522e935cf85498.tar.gz prosody-cf984835d120a714e2ed4337f8522e935cf85498.zip |
mod_c2s, mod_s2s, mod_component: Log invalid XML escaped (fixes #734)
See 6ed0d6224d64
Diffstat (limited to 'plugins/mod_c2s.lua')
-rw-r--r-- | plugins/mod_c2s.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua index 36e6a152..8d7b92fe 100644 --- a/plugins/mod_c2s.lua +++ b/plugins/mod_c2s.lua @@ -290,7 +290,7 @@ function listener.onconnect(conn) if data then local ok, err = stream:feed(data); if not ok then - 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 end |