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 | a45a94ad3f2f7fbef2f361cbc25a4c5d8c256e05 (patch) | |
tree | 3205f1b5a0ef89f0ecad848511c61e81b5dda168 /plugins | |
parent | e1cc07c773b16c6a376dda569f5cf0bfab0998a0 (diff) | |
download | prosody-a45a94ad3f2f7fbef2f361cbc25a4c5d8c256e05.tar.gz prosody-a45a94ad3f2f7fbef2f361cbc25a4c5d8c256e05.zip |
mod_s2s: Escape invalid XML in loggin (same way as mod_c2s) fix #1574
Diffstat (limited to 'plugins')
-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 |