aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-02-13 19:35:12 +0000
committerMatthew Wild <mwild1@gmail.com>2010-02-13 19:35:12 +0000
commit107527504299072512920fe9374f85cf7687c694 (patch)
treea38dae06eeb9225426eb4c3aa29b42f3d308060f
parent27114996e41d03b74913ccf02240ae572e09ad82 (diff)
downloadprosody-107527504299072512920fe9374f85cf7687c694.tar.gz
prosody-107527504299072512920fe9374f85cf7687c694.zip
mod_saslauth: Don't print raw SASL data to avoid logging passwords unnecessarily
-rw-r--r--plugins/mod_saslauth.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua
index c0f57cd7..9fd719c9 100644
--- a/plugins/mod_saslauth.lua
+++ b/plugins/mod_saslauth.lua
@@ -38,13 +38,13 @@ local new_sasl = require "util.sasl".new;
local function build_reply(status, ret, err_msg)
local reply = st.stanza(status, {xmlns = xmlns_sasl});
if status == "challenge" then
- log("debug", "%s", ret or "");
+ --log("debug", "CHALLENGE: %s", ret or "");
reply:text(base64.encode(ret or ""));
elseif status == "failure" then
reply:tag(ret):up();
if err_msg then reply:tag("text"):text(err_msg); end
elseif status == "success" then
- log("debug", "%s", ret or "");
+ --log("debug", "SUCCESS: %s", ret or "");
reply:text(base64.encode(ret or ""));
else
module:log("error", "Unknown sasl status: %s", status);
@@ -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);
+ --log("debug", "AUTH: %s", text:gsub("[%z\001-\008\011\012\014-\031]", " "));
if not text then
session.sasl_handler = nil;
session.send(build_reply("failure", "incorrect-encoding"));