diff options
-rw-r--r-- | plugins/mod_saslauth.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua index 87f24273..9082d69d 100644 --- a/plugins/mod_saslauth.lua +++ b/plugins/mod_saslauth.lua @@ -77,8 +77,12 @@ local function credentials_callback(mechanism, ...) 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 |