Comparison

util/sasl.lua @ 495:abc4fd4d262a

Do idna-to-ascii to the realm we send first in Digest-MD5.
author Tobias Markmann <tm@ayena.de>
date Sun, 30 Nov 2008 00:44:23 +0100
parent 476:4744735a0a5e
child 496:b3251b137d68
comparison
equal deleted inserted replaced
490:9087f39b4222 495:abc4fd4d262a
85 if (self.step == 1) then 85 if (self.step == 1) then
86 local challenge = serialize({ nonce = object.nonce, 86 local challenge = serialize({ nonce = object.nonce,
87 qop = "auth", 87 qop = "auth",
88 charset = "utf-8", 88 charset = "utf-8",
89 algorithm = "md5-sess", 89 algorithm = "md5-sess",
90 realm = self.realm}); 90 realm = idna_ascii(self.realm)});
91 return "challenge", challenge 91 return "challenge", challenge
92 elseif (self.step == 2) then 92 elseif (self.step == 2) then
93 local response = parse(message) 93 local response = parse(message)
94 -- check for replay attack 94 -- check for replay attack
95 if response["nc"] then 95 if response["nc"] then