Software /
code /
prosody
Changeset
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 |
parents | 1484:80e4f1d731c2 |
children | 1486:3e04efa8af7e |
files | util/sasl.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
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 = "";