aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-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 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