diff mod_auth_ldap/mod_auth_ldap.lua @ 902:490cb9161c81

mod_auth_{external,internal_yubikey,ldap,ldap2,sql}: No need to nodeprep in SASL handler.
author Waqas Hussain <waqas20@gmail.com>
date Sat, 26 Jan 2013 04:34:05 +0500
parents 881ec9919144
children 8e3420d48508
line wrap: on
line diff
--- a/mod_auth_ldap/mod_auth_ldap.lua	Sat Jan 26 00:15:24 2013 +0100
+++ b/mod_auth_ldap/mod_auth_ldap.lua	Sat Jan 26 04:34:05 2013 +0500
@@ -1,6 +1,5 @@
 
 local new_sasl = require "util.sasl".new;
-local nodeprep = require "util.encodings".stringprep.nodeprep;
 local log = require "util.logger".init("auth_ldap");
 
 local ldap_server = module:get_option("ldap_server") or "localhost";
@@ -42,12 +41,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 provider.test_password(prepped_username, password), true;
+			return provider.test_password(username, password), true;
 		end
 	};
 	return new_sasl(module.host, testpass_authentication_profile);