Software /
code /
prosody
Diff
util/sasl.lua @ 1485:fbefd16d2955
Move to-unicode conversion from mod_saslauth.lua to sasl.lua.
author | Tobias Markmann <tm@ayena.de> |
---|---|
date | Sun, 05 Jul 2009 19:02:55 +0200 |
parent | 1376:13587cf24435 |
child | 1518:9707dfa80980 |
line wrap: on
line diff
--- a/util/sasl.lua Sun Jul 05 18:59:46 2009 +0200 +++ b/util/sasl.lua Sun Jul 05 19:02:55 2009 +0200 @@ -19,6 +19,7 @@ local generate_uuid = require "util.uuid".generate; local t_insert, t_concat = table.insert, table.concat; local to_byte, to_char = string.byte, string.char; +local to_unicode = require "util.encodings".idna.to_unicode; local s_match = string.match; local gmatch = string.gmatch local string = string @@ -199,7 +200,7 @@ --TODO maybe realm support self.username = response["username"]; - local password_encoding, Y = self.password_handler(response["username"], domain, response["realm"], "DIGEST-MD5", decoder); + local password_encoding, Y = self.password_handler(response["username"], to_unicode(domain), response["realm"], "DIGEST-MD5", decoder); if Y == nil then return "failure", "not-authorized" elseif Y == false then return "failure", "account-disabled" end local A1 = "";