Changeset

496:b3251b137d68

idna-to-unicode so password_handler looks for the right domain.
author Tobias Markmann <tm@ayena.de>
date Sun, 30 Nov 2008 01:35:40 +0100
parents 495:abc4fd4d262a
children 497:a2ccfabfda82 505:1b938e00412c
files util/sasl.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/sasl.lua	Sun Nov 30 00:44:23 2008 +0100
+++ b/util/sasl.lua	Sun Nov 30 01:35:40 2008 +0100
@@ -12,6 +12,7 @@
 local error = error
 local print = print
 local idna_ascii = require "util.encodings".idna.to_ascii
+local idna_unicode = require "util.encodings".idna.to_unicode
 
 module "sasl"
 
@@ -126,7 +127,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"], idna_unicode(response["realm"]), "DIGEST-MD5")
 			if Y == nil then return "failure", "not-authorized"
 			elseif Y == false then return "failure", "account-disabled" end