aboutsummaryrefslogtreecommitdiffstats
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
commitce7b4401a5e2bbcb576a610c112e428563289118 (patch)
tree65cbd0e29ad0d12ab8ef89ba31501024983d67b6
parent4cc4dd6a68c1c080603fd4e567cab4a8c11cd1ff (diff)
downloadprosody-ce7b4401a5e2bbcb576a610c112e428563289118.tar.gz
prosody-ce7b4401a5e2bbcb576a610c112e428563289118.zip
mod_saslauth: "" ~= nil (thanks, Zash!)
-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