aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2009-12-23 23:09:44 +0100
committerTobias Markmann <tm@ayena.de>2009-12-23 23:09:44 +0100
commit04a38eb6c5fad9ccd5ee7c01b09be4861273203e (patch)
treef942a538834de319a75391079e9cd30316f26739
parent6a6004339d3085dd8da68de98852c9c08ae0d94d (diff)
downloadprosody-04a38eb6c5fad9ccd5ee7c01b09be4861273203e.tar.gz
prosody-04a38eb6c5fad9ccd5ee7c01b09be4861273203e.zip
mod_saslauth: Sanitize debugging information so it won't break terminal emulation when using GSSAPI auth.
-rw-r--r--plugins/mod_saslauth.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua
index 0d3fdd83..fc646ebc 100644
--- a/plugins/mod_saslauth.lua
+++ b/plugins/mod_saslauth.lua
@@ -121,7 +121,7 @@ local function sasl_handler(session, stanza)
local text = stanza[1];
if text then
text = base64.decode(text);
- log("debug", "%s", text); -- FIXME: binary output will screw up the terminal
+ log("debug", "%s", text:gsub("[%z\001-\009\011\012\014-\031]", " "));
if not text then
session.sasl_handler = nil;
session.send(build_reply("failure", "incorrect-encoding"));