usermanager, mod_auth_internal_hashed, mod_legacyauth: New order of parameters for usermanager.test_password - username, host, password
--- a/core/usermanager.lua Tue Jul 20 17:42:44 2010 +0500
+++ b/core/usermanager.lua Wed Jul 21 21:01:36 2010 +0100
@@ -63,7 +63,7 @@
function is_cyrus(host) return config.get(host, "core", "sasl_backend") == "cyrus"; end
-function test_password(username, password, host)
+function test_password(username, host, password)
return hosts[host].users.test_password(username, password);
end
--- a/plugins/mod_auth_internal_hashed.lua Tue Jul 20 17:42:44 2010 +0500
+++ b/plugins/mod_auth_internal_hashed.lua Wed Jul 21 21:01:36 2010 +0100
@@ -141,7 +141,7 @@
log("debug", "NODEprep failed on username: %s", username);
return "", nil;
end
- return usermanager.test_password(prepped_username, password, realm), true;
+ return usermanager.test_password(prepped_username, realm, password), true;
end,
scram_sha_1 = function(username, realm)
local credentials = datamanager.load(username, host, "accounts");
--- a/plugins/mod_legacyauth.lua Tue Jul 20 17:42:44 2010 +0500
+++ b/plugins/mod_legacyauth.lua Wed Jul 21 21:01:36 2010 +0100
@@ -50,7 +50,7 @@
username = nodeprep(username);
resource = resourceprep(resource)
local reply = st.reply(stanza);
- if usermanager.test_password(username, password, session.host) then
+ if usermanager.test_password(username, session.host, password) then
-- Authentication successful!
local success, err = sessionmanager.make_authenticated(session, username);
if success then