usermanager, mod_auth_internal_hashed, mod_legacyauth: New order of parameters for usermanager.test_password - username, host, password

Wed, 21 Jul 2010 21:01:36 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Wed, 21 Jul 2010 21:01:36 +0100
changeset 3395
e736f68c1047
parent 3394
9bf5f2b3314b
child 3396
23cf369ed1c3

usermanager, mod_auth_internal_hashed, mod_legacyauth: New order of parameters for usermanager.test_password - username, host, password

core/usermanager.lua file | annotate | diff | comparison | revisions
plugins/mod_auth_internal_hashed.lua file | annotate | diff | comparison | revisions
plugins/mod_legacyauth.lua file | annotate | diff | comparison | revisions
--- 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

mercurial