Changeset

4492:0a4781f165e3

mod_saslauth: "" ~= nil (thanks, Zash!)
author Paul Aurich <paul@darkrain42.org>
date Tue, 24 Jan 2012 14:57:53 -0800
parents 4491:381e0b874e6d
children 4493:cad62a675b60
files plugins/mod_saslauth.lua
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_saslauth.lua	Wed Jan 18 08:54:26 2012 +0500
+++ b/plugins/mod_saslauth.lua	Tue Jan 24 14:57:53 2012 -0800
@@ -191,8 +191,10 @@
 		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