From 03efdf7669e72be49b919adfa0085545182e7811 Mon Sep 17 00:00:00 2001 From: Paul Aurich Date: Tue, 24 Jan 2012 14:57:53 -0800 Subject: mod_saslauth: "" ~= nil (thanks, Zash!) --- plugins/mod_saslauth.lua | 6 ++++-- 1 file 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 -- cgit v1.2.3