Changeset

12946:59478b295137

mod_auth_internal_hashed: Shorten call path Why did it call a function defined in the same module through usermanager?
author Kim Alvefur <zash@zash.se>
date Sat, 18 Mar 2023 16:13:32 +0100
parents 12945:d2c1c327a4d1
children 12947:14a44b1a51d0
files plugins/mod_auth_internal_hashed.lua
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_auth_internal_hashed.lua	Thu Mar 16 13:57:30 2023 +0100
+++ b/plugins/mod_auth_internal_hashed.lua	Sat Mar 18 16:13:32 2023 +0100
@@ -10,7 +10,6 @@
 local max = math.max;
 
 local scram_hashers = require "util.sasl.scram".hashers;
-local usermanager = require "core.usermanager";
 local generate_uuid = require "util.uuid".generate;
 local new_sasl = require "util.sasl".new;
 local hex = require"util.hex";
@@ -163,8 +162,8 @@
 
 function provider.get_sasl_handler()
 	local testpass_authentication_profile = {
-		plain_test = function(_, username, password, realm)
-			return usermanager.test_password(username, realm, password), provider.is_enabled(username);
+		plain_test = function(_, username, password)
+			return provider.test_password(username, password), provider.is_enabled(username);
 		end,
 		[scram_name] = function(_, username)
 			local credentials = accounts:get(username);