Moving realm at the beginning of the digest-md5 message send by the server.
authorTobias Markmann <tm@ayena.de>
Sun, 9 Aug 2009 19:19:03 +0000 (21:19 +0200)
committerTobias Markmann <tm@ayena.de>
Sun, 9 Aug 2009 19:19:03 +0000 (21:19 +0200)
util/sasl.lua

index 008b65757f48501d10772ca8e6214f2b810018cf..444d4cf4ea432d877ab01f5a52688aa59c891e8d 100644 (file)
@@ -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