From 27f12be9bbcb8f0a32391f55643c5c3c311a5cb2 Mon Sep 17 00:00:00 2001 From: Tobias Markmann Date: Sun, 9 Aug 2009 21:19:03 +0200 Subject: [PATCH] Moving realm at the beginning of the digest-md5 message send by the server. --- util/sasl.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/sasl.lua b/util/sasl.lua index 008b6575..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 -- 2.30.2