aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2008-11-29 20:30:35 +0100
committerTobias Markmann <tm@ayena.de>2008-11-29 20:30:35 +0100
commitf39b9177c92385836bf216a459b159784a98ce23 (patch)
treeb101dd1edbe21beaaf7604b05ba6f49059ad2b04 /util
parent8d6ef1df3855daca2cb0cab27ce443816dba2d2b (diff)
parente20fe5e4675cb489a24664b8d465e6c445077ed9 (diff)
downloadprosody-f39b9177c92385836bf216a459b159784a98ce23.tar.gz
prosody-f39b9177c92385836bf216a459b159784a98ce23.zip
Automated merge.
Diffstat (limited to 'util')
-rw-r--r--util/sasl.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/util/sasl.lua b/util/sasl.lua
index 0f03647f..f1d01aed 100644
--- a/util/sasl.lua
+++ b/util/sasl.lua
@@ -11,6 +11,7 @@ local math = require "math"
local type = type
local error = error
local print = print
+local idna_ascii = require "util.encodings".idna.to_ascii
module "sasl"
@@ -130,7 +131,7 @@ local function new_digest_md5(realm, password_handler)
elseif Y == false then return "failure", "account-disabled" end
local A1 = Y..":"..response["nonce"]..":"..response["cnonce"]--:authzid
- local A2 = "AUTHENTICATE:"..protocol.."/"..domain
+ local A2 = "AUTHENTICATE:"..protocol.."/"..idna_ascii(domain)
local HA1 = md5(A1, true)
local HA2 = md5(A2, true)
@@ -140,7 +141,7 @@ local function new_digest_md5(realm, password_handler)
if response_value == response["response"] then
-- calculate rspauth
- A2 = ":"..protocol.."/"..domain
+ A2 = ":"..protocol.."/"..idna_ascii(domain)
HA1 = md5(A1, true)
HA2 = md5(A2, true)