Software /
code /
prosody
Diff
plugins/mod_saslauth.lua @ 6014:d61026bee038
mod_saslauth: Make sure sasl handler has add_cb_handler (fixes #392)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 12 Feb 2014 19:25:15 +0100 |
parent | 5860:87e2fafba5df |
child | 6038:b3ceb7627e27 |
line wrap: on
line diff
--- 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);