Changeset

3395:e736f68c1047

usermanager, mod_auth_internal_hashed, mod_legacyauth: New order of parameters for usermanager.test_password - username, host, password
author Matthew Wild <mwild1@gmail.com>
date Wed, 21 Jul 2010 21:01:36 +0100
parents 3394:9bf5f2b3314b
children 3396:23cf369ed1c3
files core/usermanager.lua plugins/mod_auth_internal_hashed.lua plugins/mod_legacyauth.lua
diffstat 3 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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