Changeset

5302:52fe5df91c65

mod_auth_internal_plain, mod_auth_internal_hashed: No need to nodeprep here.
author Waqas Hussain <waqas20@gmail.com>
date Tue, 22 Jan 2013 08:26:08 +0500
parents 5301:6279caf921f1
children 5303:19a4a3462574 5304:67a49d47ef39
files plugins/mod_auth_internal_hashed.lua plugins/mod_auth_internal_plain.lua
diffstat 2 files changed, 2 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_auth_internal_hashed.lua	Tue Jan 22 08:21:05 2013 +0500
+++ b/plugins/mod_auth_internal_hashed.lua	Tue Jan 22 08:26:08 2013 +0500
@@ -13,7 +13,6 @@
 local usermanager = require "core.usermanager";
 local generate_uuid = require "util.uuid".generate;
 local new_sasl = require "util.sasl".new;
-local nodeprep = require "util.encodings".stringprep.nodeprep;
 
 local to_hex;
 do
@@ -124,12 +123,7 @@
 function provider.get_sasl_handler()
 	local testpass_authentication_profile = {
 		plain_test = function(sasl, username, password, realm)
-			local prepped_username = nodeprep(username);
-			if not prepped_username then
-				log("debug", "NODEprep failed on username: %s", username);
-				return "", nil;
-			end
-			return usermanager.test_password(prepped_username, realm, password), true;
+			return usermanager.test_password(username, realm, password), true;
 		end,
 		scram_sha_1 = function(sasl, username, realm)
 			local credentials = datamanager.load(username, host, "accounts");
--- a/plugins/mod_auth_internal_plain.lua	Tue Jan 22 08:21:05 2013 +0500
+++ b/plugins/mod_auth_internal_plain.lua	Tue Jan 22 08:26:08 2013 +0500
@@ -9,7 +9,6 @@
 local datamanager = require "util.datamanager";
 local usermanager = require "core.usermanager";
 local new_sasl = require "util.sasl".new;
-local nodeprep = require "util.encodings".stringprep.nodeprep;
 
 local log = module._log;
 local host = module.host;
@@ -67,12 +66,7 @@
 function provider.get_sasl_handler()
 	local getpass_authentication_profile = {
 		plain = function(sasl, username, realm)
-			local prepped_username = nodeprep(username);
-			if not prepped_username then
-				log("debug", "NODEprep failed on username: %s", username);
-				return "", nil;
-			end
-			local password = usermanager.get_password(prepped_username, realm);
+			local password = usermanager.get_password(username, realm);
 			if not password then
 				return "", nil;
 			end