aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-08-10 14:29:28 +0100
committerMatthew Wild <mwild1@gmail.com>2009-08-10 14:29:28 +0100
commit20984a8ffbb01ba242e4efaba6a6bffaf04bbc03 (patch)
tree121fa1ff2d0f38007d51bc319ba11259734faaa5 /util
parent9af3cc09129b9e8e7a1a075b4ff08d1464191461 (diff)
parent7ef662388b28c77bda969c1ea28995b7988a8fb6 (diff)
downloadprosody-20984a8ffbb01ba242e4efaba6a6bffaf04bbc03.tar.gz
prosody-20984a8ffbb01ba242e4efaba6a6bffaf04bbc03.zip
Merge with Tobias
Diffstat (limited to 'util')
-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 = "";