# HG changeset patch # User Kim Alvefur # Date 1392229515 -3600 # Node ID d61026bee038d31c804cb2fb38e6ee3998518058 # Parent 918ab89cb68d323cf5ccd69fd1a6de30b20e358b mod_saslauth: Make sure sasl handler has add_cb_handler (fixes #392) diff -r 918ab89cb68d -r d61026bee038 plugins/mod_saslauth.lua --- a/plugins/mod_saslauth.lua Sun Feb 09 15:12:13 2014 +0100 +++ b/plugins/mod_saslauth.lua Wed Feb 12 19:25:15 2014 +0100 @@ -245,7 +245,7 @@ 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);