Software /
code /
prosody
Changeset
11018:bacca65ce107 0.11 0.11.6
mod_s2s: Escape invalid XML in loggin (same way as mod_c2s) fix #1574
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 01 Aug 2020 12:58:37 +0200 |
parents | 11016:5176d9f727f6 |
children | 11019:d1604721b665 11061:45e1c467a3a7 |
files | plugins/mod_s2s/mod_s2s.lua |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_s2s/mod_s2s.lua Sat Aug 08 13:13:50 2020 +0100 +++ b/plugins/mod_s2s/mod_s2s.lua Sat Aug 01 12:58:37 2020 +0200 @@ -595,8 +595,7 @@ 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