Comparison

util/sasl/digest-md5.lua @ 2189:1182e7ae2964 sasl

Broken DIGEST-MD5 client support again.
author Tobias Markmann <tm@ayena.de>
date Fri, 13 Nov 2009 11:10:06 +0100
parent 2188:1fd38975addd
child 2191:e79c0ce6cf54
comparison
equal deleted inserted replaced
2188:1fd38975addd 2189:1182e7ae2964
171 self.username = response["username"]; 171 self.username = response["username"];
172 if self.profile.plain then 172 if self.profile.plain then
173 local password, state = self.profile.plain(response["username"], self.realm) 173 local password, state = self.profile.plain(response["username"], self.realm)
174 if state == nil then return "failure", "not-authorized" 174 if state == nil then return "failure", "not-authorized"
175 elseif state == false then return "failure", "account-disabled" end 175 elseif state == false then return "failure", "account-disabled" end
176 Y = md5(response["username"]..":"..self.realm..":"..password); 176 Y = md5(response["username"]..":"..response["realm"]..":"..password);
177 elseif self.profile["digest-md5"] then 177 elseif self.profile["digest-md5"] then
178 --local Y, state = self.profile["digest-md5"](response["username"], self.realm, response["charset"]) 178 --local Y, state = self.profile["digest-md5"](response["username"], self.realm, response["charset"])
179 elseif self.profile["digest-md5-test"] then 179 elseif self.profile["digest-md5-test"] then
180 180 -- TODO
181 end 181 end
182 --local password_encoding, Y = self.credentials_handler("DIGEST-MD5", response["username"], self.realm, response["realm"], decoder); 182 --local password_encoding, Y = self.credentials_handler("DIGEST-MD5", response["username"], self.realm, response["realm"], decoder);
183 --if Y == nil then return "failure", "not-authorized" 183 --if Y == nil then return "failure", "not-authorized"
184 --elseif Y == false then return "failure", "account-disabled" end 184 --elseif Y == false then return "failure", "account-disabled" end
185 local A1 = ""; 185 local A1 = "";