aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--util/sasl.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/sasl.lua b/util/sasl.lua
index 48412ea7..444d4cf4 100644
--- a/util/sasl.lua
+++ b/util/sasl.lua
@@ -70,11 +70,11 @@ local function new_digest_md5(realm, credentials_handler)
if type(message) ~= "table" then error("serialize needs an argument of type table.") end
-- testing all possible values
+ if message["realm"] then data = data..[[realm="]]..message.realm..[[",]] end
if message["nonce"] then data = data..[[nonce="]]..message.nonce..[[",]] end
if message["qop"] then data = data..[[qop="]]..message.qop..[[",]] end
if message["charset"] then data = data..[[charset=]]..message.charset.."," end
if message["algorithm"] then data = data..[[algorithm=]]..message.algorithm.."," end
- if message["realm"] then data = data..[[realm="]]..message.realm..[[",]] end
if message["rspauth"] then data = data..[[rspauth=]]..message.rspauth.."," end
data = data:gsub(",$", "")
return data
@@ -198,7 +198,7 @@ local function new_digest_md5(realm, credentials_handler)
--TODO maybe realm support
self.username = response["username"];
- local password_encoding, Y = self.credentials_handler("DIGEST-MD5", response["username"], to_unicode(domain), response["realm"], decoder);
+ local password_encoding, Y = self.credentials_handler("DIGEST-MD5", response["username"], self.realm, response["realm"], decoder);
if Y == nil then return "failure", "not-authorized"
elseif Y == false then return "failure", "account-disabled" end
local A1 = "";