diff options
author | Matthew Wild <mwild1@gmail.com> | 2014-08-23 09:29:17 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2014-08-23 09:29:17 +0100 |
commit | 2a6c5e98cf0c6968d9a48b3a21e02ff25f5abee5 (patch) | |
tree | 205daf09b6f4e989fa855d46ed220c2b641c7ae2 | |
parent | 038b399e6a9d463af7e323f572e218bafa9a613d (diff) | |
download | prosody-2a6c5e98cf0c6968d9a48b3a21e02ff25f5abee5.tar.gz prosody-2a6c5e98cf0c6968d9a48b3a21e02ff25f5abee5.zip |
mod_c2s, mod_s2s: Log received invalid stream headers
-rw-r--r-- | plugins/mod_c2s.lua | 2 | ||||
-rw-r--r-- | plugins/mod_s2s/mod_s2s.lua | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua index 5feb1f2c..b6895f4b 100644 --- a/plugins/mod_c2s.lua +++ b/plugins/mod_c2s.lua @@ -91,7 +91,7 @@ end function stream_callbacks.error(session, error, data) if error == "no-stream" then - session.log("debug", "Invalid opening stream header"); + session.log("debug", "Invalid opening stream header (%s)", (data:gsub("^([^\1]+)\1", "{%1}"))); session:close("invalid-namespace"); elseif error == "parse-error" then (session.log or log)("debug", "Client XML parse error: %s", tostring(data)); diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua index c288d858..44334428 100644 --- a/plugins/mod_s2s/mod_s2s.lua +++ b/plugins/mod_s2s/mod_s2s.lua @@ -407,6 +407,7 @@ end function stream_callbacks.error(session, error, data) if error == "no-stream" then + session.log("debug", "Invalid opening stream header (%s)", (data:gsub("^([^\1]+)\1", "{%1}"))); session:close("invalid-namespace"); elseif error == "parse-error" then session.log("debug", "Server-to-server XML parse error: %s", tostring(error)); |