aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/usermanager.lua2
-rw-r--r--plugins/mod_auth_internal_hashed.lua2
-rw-r--r--plugins/mod_legacyauth.lua2
3 files changed, 3 insertions, 3 deletions
diff --git a/core/usermanager.lua b/core/usermanager.lua
index 6a2a8419..43e43df9 100644
--- a/core/usermanager.lua
+++ b/core/usermanager.lua
@@ -63,7 +63,7 @@ prosody.events.add_handler("component-activated", initialize_host, 100);
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 --git a/plugins/mod_auth_internal_hashed.lua b/plugins/mod_auth_internal_hashed.lua
index c9b8107b..2bee141c 100644
--- a/plugins/mod_auth_internal_hashed.lua
+++ b/plugins/mod_auth_internal_hashed.lua
@@ -141,7 +141,7 @@ function new_hashpass_provider(host)
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 --git a/plugins/mod_legacyauth.lua b/plugins/mod_legacyauth.lua
index 50566fa6..2e1ca328 100644
--- a/plugins/mod_legacyauth.lua
+++ b/plugins/mod_legacyauth.lua
@@ -50,7 +50,7 @@ module:add_iq_handler("c2s_unauthed", "jabber:iq:auth",
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