Software /
code /
prosody
Diff
plugins/mod_saslauth.lua @ 2877:1edeb8fe7d14
Merge 0.6.2/waqas with 0.6.2/MattJ
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 03 Mar 2010 22:05:05 +0000 |
parent | 2784:e165414a454c |
parent | 2860:ad534f89c758 |
child | 2923:b7049746bd29 |
line wrap: on
line diff
--- a/plugins/mod_saslauth.lua Fri Feb 19 03:30:27 2010 +0000 +++ b/plugins/mod_saslauth.lua Wed Mar 03 22:05:05 2010 +0000 @@ -38,13 +38,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); @@ -124,7 +124,7 @@ 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"));