util/sasl.lua

changeset 529
631e7d16d22b
parent 519
cccd610a0ef9
child 595
08ed4fa2f89d
--- a/util/sasl.lua	Wed Dec 03 15:09:58 2008 +0000
+++ b/util/sasl.lua	Wed Dec 03 22:08:49 2008 +0500
@@ -144,6 +144,7 @@
 			if not response["qop"] then response["qop"] = "auth" end
 			
 			if response["realm"] == nil then response["realm"] = "" end
+			local raw_realm = response["realm"];
 			
 			if response["charset"] == nil then
 				response["username"] = latin1toutf8(response["username"])
@@ -163,7 +164,7 @@
 			
 			--TODO maybe realm support
 			self.username = response["username"]
-			local password_encoding, Y = self.password_handler(response["username"], response["realm"], "DIGEST-MD5")
+			local password_encoding, Y = self.password_handler(response["username"], response["realm"], "DIGEST-MD5", raw_realm)
 			if Y == nil then return "failure", "not-authorized"
 			elseif Y == false then return "failure", "account-disabled" end
 			

mercurial