mod_auth_internal_hashed: Fixed a traceback in account creation.

Sun, 13 Jun 2010 04:07:38 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Sun, 13 Jun 2010 04:07:38 +0500
changeset 3243
dc7131d4e189
parent 3242
43f9478d8119
child 3244
616a3bb2bad9

mod_auth_internal_hashed: Fixed a traceback in account creation.

plugins/mod_auth_internal_hashed.lua file | annotate | diff | comparison | revisions
--- a/plugins/mod_auth_internal_hashed.lua	Sat Jun 12 02:47:53 2010 +0100
+++ b/plugins/mod_auth_internal_hashed.lua	Sun Jun 13 04:07:38 2010 +0500
@@ -115,7 +115,7 @@
 	function provider.create_user(username, password)
 		if is_cyrus(host) then return nil, "Account creation/modification not available with Cyrus SASL."; end
 		local salt = generate_uuid();
-		local valid, stored_key, server_key = saltedPasswordSHA1(password, salt, iteration_count);
+		local valid, stored_key, server_key = getAuthenticationDatabaseSHA1(password, salt, iteration_count);
 		local stored_key_hex = stored_key:gsub(".", function (c) return ("%02x"):format(c:byte()); end);
 		local server_key_hex = server_key:gsub(".", function (c) return ("%02x"):format(c:byte()); end);
 		return datamanager.store(username, host, "accounts", {stored_key = stored_key_hex, server_key = server_key_hex, salt = salt, iteration_count = iteration_count});

mercurial