# HG changeset patch # User Matthew Wild # Date 1279742496 -3600 # Node ID e736f68c10474805df124961392073a37de9ddb6 # Parent 9bf5f2b3314ba76428a73b2453d8a05be87329d6 usermanager, mod_auth_internal_hashed, mod_legacyauth: New order of parameters for usermanager.test_password - username, host, password diff -r 9bf5f2b3314b -r e736f68c1047 core/usermanager.lua --- 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 diff -r 9bf5f2b3314b -r e736f68c1047 plugins/mod_auth_internal_hashed.lua --- 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"); diff -r 9bf5f2b3314b -r e736f68c1047 plugins/mod_legacyauth.lua --- 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