aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_saslauth.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_saslauth.lua')
-rw-r--r--plugins/mod_saslauth.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua
index 9917c303..f7803bc9 100644
--- a/plugins/mod_saslauth.lua
+++ b/plugins/mod_saslauth.lua
@@ -223,6 +223,7 @@ local bind_attr = { xmlns='urn:ietf:params:xml:ns:xmpp-bind' };
local xmpp_session_attr = { xmlns='urn:ietf:params:xml:ns:xmpp-session' };
module:hook("stream-features", function(event)
local origin, features = event.origin, event.features;
+ local log = origin.log or log;
if not origin.username then
if secure_auth_only and not origin.secure then
return;
@@ -251,7 +252,7 @@ module:hook("stream-features", function(event)
if mechanisms[1] then
features:add_child(mechanisms);
else
- (origin.log or log)("warn", "No SASL mechanisms to offer");
+ log("warn", "No SASL mechanisms to offer");
end
else
features:tag("bind", bind_attr):tag("required"):up():up();