mirror of
https://github.com/bjc/prosody.git
synced 2025-04-05 22:27:38 +03:00
mod_saslauth: Fix traceback on attempted login for non-existent users
This commit is contained in:
parent
1181b101b5
commit
43ff43e594
1 changed files with 6 additions and 2 deletions
|
@ -77,8 +77,12 @@ local function credentials_callback(mechanism, ...)
|
||||||
function func(x) return x; end
|
function func(x) return x; end
|
||||||
local node, domain, realm, decoder = arg[1], arg[2], arg[3], arg[4];
|
local node, domain, realm, decoder = arg[1], arg[2], arg[3], arg[4];
|
||||||
local password = usermanager_get_password(node, domain)
|
local password = usermanager_get_password(node, domain)
|
||||||
if decoder then node, realm, password = decoder(node), decoder(realm), decoder(password); end
|
if password then
|
||||||
return func, md5(node..":"..realm..":"..password);
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue