# HG changeset patch # User Tobias Markmann # Date 1246813375 -7200 # Node ID fbefd16d295562ce4652ec9fd43222d5d67cccd0 # Parent 80e4f1d731c2ee0053708c0f19c9f4efc4ce3dbe Move to-unicode conversion from mod_saslauth.lua to sasl.lua. diff -r 80e4f1d731c2 -r fbefd16d2955 util/sasl.lua --- 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 = "";