diff options
author | Kim Alvefur <zash@zash.se> | 2020-08-01 12:58:37 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-08-01 12:58:37 +0200 |
commit | 302dfe821e973c9499bd1274e093330d24977193 (patch) | |
tree | 3205f1b5a0ef89f0ecad848511c61e81b5dda168 /plugins/mod_s2s/mod_s2s.lua | |
parent | 348d2a8e1cb52dffbdf28cc52494e4f93fe71455 (diff) | |
download | prosody-vault/0.11.6.tar.gz prosody-vault/0.11.6.zip |
mod_s2s: Escape invalid XML in loggin (same way as mod_c2s) fix #1574vault/0.11.6
Diffstat (limited to 'plugins/mod_s2s/mod_s2s.lua')
-rw-r--r-- | plugins/mod_s2s/mod_s2s.lua | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua index aae37b7f..3f56b953 100644 --- a/plugins/mod_s2s/mod_s2s.lua +++ b/plugins/mod_s2s/mod_s2s.lua @@ -595,8 +595,7 @@ local function initialize_session(session) if data then local ok, err = stream:feed(data); if ok then return; end - log("warn", "Received invalid XML: %s", data); - log("warn", "Problem was: %s", err); + 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("not-well-formed"); end end |