X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=util%2Fsasl.lua;h=444d4cf4ea432d877ab01f5a52688aa59c891e8d;hb=7cde004ab530110577c5107636bc010576f29df1;hp=48412ea7189802575dbcbb43012e732ad849e2d0;hpb=539017cb736e4b52f5b882e37f2bdf95af9e59e7;p=prosody.git 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 = "";