Software /
code /
prosody
Changeset
293:b446de4e258e
base64 encode the sasl responses
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 16 Nov 2008 02:10:01 +0500 |
parents | 292:33175ad2f682 |
children | 294:5d861d6e5bbd 295:bb078eb1f1de |
files | plugins/mod_saslauth.lua |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_saslauth.lua Sun Nov 16 01:54:14 2008 +0500 +++ b/plugins/mod_saslauth.lua Sun Nov 16 02:10:01 2008 +0500 @@ -20,12 +20,12 @@ 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