aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_saslauth.lua
diff options
context:
space:
mode:
authorPaul Aurich <paul@darkrain42.org>2012-01-24 14:57:53 -0800
committerPaul Aurich <paul@darkrain42.org>2012-01-24 14:57:53 -0800
commit03efdf7669e72be49b919adfa0085545182e7811 (patch)
tree65cbd0e29ad0d12ab8ef89ba31501024983d67b6 /plugins/mod_saslauth.lua
parentd59d8e6325a4a1cb3c4762d96697fcfbbbdd37df (diff)
downloadprosody-03efdf7669e72be49b919adfa0085545182e7811.tar.gz
prosody-03efdf7669e72be49b919adfa0085545182e7811.zip
mod_saslauth: "" ~= nil (thanks, Zash!)
Diffstat (limited to 'plugins/mod_saslauth.lua')
-rw-r--r--plugins/mod_saslauth.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua
index 9c62e5ec..58655a24 100644
--- a/plugins/mod_saslauth.lua
+++ b/plugins/mod_saslauth.lua
@@ -191,8 +191,10 @@ local function s2s_external_auth(session, stanza)
session.from_host = text;
end
session.sends2s(build_reply("success"))
- module:log("info", "Accepting SASL EXTERNAL identity from %s", text or session.from_host);
- s2s_make_authenticated(session, text or session.from_host)
+
+ local domain = text ~= "" and text or session.from_host;
+ module:log("info", "Accepting SASL EXTERNAL identity from %s", domain);
+ s2s_make_authenticated(session, domain);
session:reset_stream();
return true
end