# HG changeset patch # User Matthew Wild # Date 1266089712 0 # Node ID e486aca8c5d1e54813432b9cd4205019cef123aa # Parent 96db2eed2af90c6b96633565be22b83f378bc820 mod_saslauth: Don't print raw SASL data to avoid logging passwords unnecessarily diff -r 96db2eed2af9 -r e486aca8c5d1 plugins/mod_saslauth.lua --- a/plugins/mod_saslauth.lua Sat Feb 13 16:22:05 2010 +0000 +++ b/plugins/mod_saslauth.lua Sat Feb 13 19:35:12 2010 +0000 @@ -69,13 +69,13 @@ 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); @@ -123,7 +123,7 @@ local text = stanza[1]; if text then text = base64.decode(text); - log("debug", "%s", text:gsub("[%z\001-\008\011\012\014-\031]", " ")); + --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"));