aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2014-02-12 19:25:15 +0100
committerKim Alvefur <zash@zash.se>2014-02-12 19:25:15 +0100
commit528a8215a55b8421daa33b421efcd05e2300cc4c (patch)
tree0d2fab7dd71bbd3cb37d669fc222b2baed58c58c /plugins
parent87aaaa9955eec246c4f2d921510731aefd4ea9fa (diff)
downloadprosody-528a8215a55b8421daa33b421efcd05e2300cc4c.tar.gz
prosody-528a8215a55b8421daa33b421efcd05e2300cc4c.zip
mod_saslauth: Make sure sasl handler has add_cb_handler (fixes #392)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_saslauth.lua2
1 files changed, 1 insertions, 1 deletions
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);