Software /
code /
prosody
Diff
plugins/mod_saslauth.lua @ 1637:c1292624f991
mod_saslauth: Fix traceback on attempted login for non-existent users
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 05 Aug 2009 16:31:56 +0100 |
parent | 1585:edc066730d11 |
child | 1638:6fd0c2f46b21 |
line wrap: on
line diff
--- a/plugins/mod_saslauth.lua Wed Aug 05 13:52:14 2009 +0100 +++ b/plugins/mod_saslauth.lua Wed Aug 05 16:31:56 2009 +0100 @@ -77,8 +77,12 @@ function func(x) return x; end local node, domain, realm, decoder = arg[1], arg[2], arg[3], arg[4]; local password = usermanager_get_password(node, domain) - if decoder then node, realm, password = decoder(node), decoder(realm), decoder(password); end - return func, md5(node..":"..realm..":"..password); + if password then + if decoder then node, realm, password = decoder(node), decoder(realm), decoder(password); end + return func, md5(node..":"..realm..":"..password); + else + return func, nil; + end end end