aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_s2s
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-08-01 12:58:37 +0200
committerKim Alvefur <zash@zash.se>2020-08-01 12:58:37 +0200
commit63b5689d50717d21d1d722e52238f508bfda3bbe (patch)
tree3205f1b5a0ef89f0ecad848511c61e81b5dda168 /plugins/mod_s2s
parentdc206f0ff429cb3da3569c633a76c74d5b4f8d1b (diff)
downloadprosody-63b5689d50717d21d1d722e52238f508bfda3bbe.tar.gz
prosody-63b5689d50717d21d1d722e52238f508bfda3bbe.zip
mod_s2s: Escape invalid XML in loggin (same way as mod_c2s) fix #15740.11.6
Diffstat (limited to 'plugins/mod_s2s')
-rw-r--r--plugins/mod_s2s/mod_s2s.lua3
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