From 8e2b0deb94ea52b49404d5b9277061101bd03cff Mon Sep 17 00:00:00 2001 From: Tobias Markmann Date: Fri, 28 Nov 2008 18:32:54 +0100 Subject: Do idna_to_ascii when building own response. --- util/sasl.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'util/sasl.lua') diff --git a/util/sasl.lua b/util/sasl.lua index 001f40fb..f10fb934 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".stringprep.saslprep.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) -- cgit v1.2.3 From e20fe5e4675cb489a24664b8d465e6c445077ed9 Mon Sep 17 00:00:00 2001 From: Tobias Markmann Date: Sat, 29 Nov 2008 12:17:21 +0100 Subject: Apply IDNA to ASCII on hostnames. --- util/sasl.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/sasl.lua') diff --git a/util/sasl.lua b/util/sasl.lua index f5ef04b8..f1d01aed 100644 --- a/util/sasl.lua +++ b/util/sasl.lua @@ -11,7 +11,7 @@ local math = require "math" local type = type local error = error local print = print -local idna_ascii = require "util.encodings".stringprep.saslprep.to_ascii +local idna_ascii = require "util.encodings".idna.to_ascii module "sasl" -- cgit v1.2.3