aboutsummaryrefslogtreecommitdiffstats
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
commit4078dc07a2a867aa7e7f010c63a9a85b52c433ee (patch)
tree0d2fab7dd71bbd3cb37d669fc222b2baed58c58c
parent481aefcb7192dfb83379df2fa92a317f95e81c72 (diff)
downloadprosody-4078dc07a2a867aa7e7f010c63a9a85b52c433ee.tar.gz
prosody-4078dc07a2a867aa7e7f010c63a9a85b52c433ee.zip
mod_saslauth: Make sure sasl handler has add_cb_handler (fixes #392)
-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);