diff options
author | Waqas Hussain <waqas20@gmail.com> | 2008-11-16 02:10:01 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2008-11-16 02:10:01 +0500 |
commit | 7c9ca1658aaf8e41dc59a2be30ca62fbfe3975fb (patch) | |
tree | c48a29b7787881a271f82bc34b1cfde9bdf0f260 /plugins | |
parent | a055e3c41b0b378079678c733ccbf424f36140f6 (diff) | |
download | prosody-7c9ca1658aaf8e41dc59a2be30ca62fbfe3975fb.tar.gz prosody-7c9ca1658aaf8e41dc59a2be30ca62fbfe3975fb.zip |
base64 encode the sasl responses
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_saslauth.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua index 5f7438d2..9df39228 100644 --- a/plugins/mod_saslauth.lua +++ b/plugins/mod_saslauth.lua @@ -20,12 +20,12 @@ 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 - reply:text(ret or ""); + reply:text(base64.encode(ret or "")); elseif status == "failure" then reply:tag(ret):up(); - if err_msg then reply:tag("text"); end + if err_msg then reply:tag("text"):text(err_msg); end elseif status == "success" then - reply:text(ret or ""); + reply:text(base64.encode(ret or "")); else error("Unknown sasl status: "..status); end |