Diff

plugins/mod_saslauth.lua @ 535:74f32ac6db40

Automated merge with http://84.46.7.57:1234
author Matthew Wild <mwild1@gmail.com>
date Wed, 03 Dec 2008 19:34:41 +0000
parent 529:631e7d16d22b
child 563:099d8a102deb
line wrap: on
line diff
--- a/plugins/mod_saslauth.lua	Wed Dec 03 20:32:03 2008 +0100
+++ b/plugins/mod_saslauth.lua	Wed Dec 03 19:34:41 2008 +0000
@@ -64,14 +64,14 @@
 	end
 end
 
-local function password_callback(node, host, mechanism)
+local function password_callback(node, host, mechanism, raw_host)
 	local password = (datamanager.load(node, host, "accounts") or {}).password; -- FIXME handle hashed passwords
 	local func = function(x) return x; end;
 	if password then
 		if mechanism == "PLAIN" then
 			return func, password;
 		elseif mechanism == "DIGEST-MD5" then
-			return func, md5(node..":"..host..":"..password);
+			return func, md5(node..":"..raw_host..":"..password);
 		end
 	end
 	return func, nil;