Software /
code /
prosody
Changeset
497:a2ccfabfda82
Merge with Tobias
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 30 Nov 2008 00:38:41 +0000 |
parents | 494:457d0c750826 (current diff) 496:b3251b137d68 (diff) |
children | 499:29f165027f07 |
files | |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/util/sasl.lua Sun Nov 30 00:33:58 2008 +0000 +++ b/util/sasl.lua Sun Nov 30 00:38:41 2008 +0000 @@ -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" @@ -87,7 +88,7 @@ qop = "auth", charset = "utf-8", algorithm = "md5-sess", - realm = self.realm}); + realm = idna_ascii(self.realm)}); return "challenge", challenge elseif (self.step == 2) then local response = parse(message) @@ -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