From 4078dc07a2a867aa7e7f010c63a9a85b52c433ee Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 12 Feb 2014 19:25:15 +0100 Subject: mod_saslauth: Make sure sasl handler has add_cb_handler (fixes #392) --- plugins/mod_saslauth.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/mod_saslauth.lua') diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua index 4513c511..94c060b3 100644 --- a/plugins/mod_saslauth.lua +++ b/plugins/mod_saslauth.lua @@ -245,7 +245,7 @@ module:hook("stream-features", function(event) if origin.encrypted then -- check wether LuaSec has the nifty binding to the function needed for tls-unique -- FIXME: would be nice to have this check only once and not for every socket - if origin.conn:socket().getpeerfinished then + if origin.conn:socket().getpeerfinished and origin.sasl_handler.add_cb_handler then origin.sasl_handler:add_cb_handler("tls-unique", function(self) return self.userdata:getpeerfinished(); end); -- cgit v1.2.3