Add NODEprepping to SASL Digest-MD5 authentication handling.

Sun, 06 Sep 2009 22:07:59 +0200

author
Tobias Markmann <tm@ayena.de>
date
Sun, 06 Sep 2009 22:07:59 +0200
changeset 1758
5acbf4318715
parent 1727
cbdc7bf61e0f
child 1759
4a280effc975

Add NODEprepping to SASL Digest-MD5 authentication handling.

plugins/mod_saslauth.lua file | annotate | diff | comparison | revisions
--- a/plugins/mod_saslauth.lua	Thu Aug 20 16:30:32 2009 +0100
+++ b/plugins/mod_saslauth.lua	Sun Sep 06 22:07:59 2009 +0200
@@ -84,7 +84,11 @@
 	elseif mechanism == "DIGEST-MD5" then
 		function func(x) return x; end
 		local node, domain, realm, decoder = ...;
-		local password = usermanager_get_password(node, domain);
+		local prepped_node = nodeprep(node);
+		if not prepped_node then
+			return func, nil;
+		end
+		local password = usermanager_get_password(prepped_node, domain);
 		if password then
 			if decoder then
 				node, realm, password = decoder(node), decoder(realm), decoder(password);

mercurial