util/sasl.lua

changeset 2079
5334723fa24d
parent 2078
a5f154548154
child 2080
ca419b92a8c7
equal deleted inserted replaced
2078:a5f154548154 2079:5334723fa24d
201 local password_encoding, Y = self.credentials_handler("DIGEST-MD5", response["username"], self.realm, response["realm"], decoder); 201 local password_encoding, Y = self.credentials_handler("DIGEST-MD5", response["username"], self.realm, response["realm"], decoder);
202 if Y == nil then return "failure", "not-authorized" 202 if Y == nil then return "failure", "not-authorized"
203 elseif Y == false then return "failure", "account-disabled" end 203 elseif Y == false then return "failure", "account-disabled" end
204 local A1 = ""; 204 local A1 = "";
205 if response.authzid then 205 if response.authzid then
206 if response.authzid == self.username.."@"..self.realm then 206 if response.authzid == self.username or response.authzid == self.username.."@"..self.realm then
207 -- COMPAT 207 -- COMPAT
208 log("warn", "Client is violating XMPP RFC. See section 6.1 of RFC 3920."); 208 log("warn", "Client is violating XMPP RFC. See section 6.1 of RFC 3920.");
209 A1 = Y..":"..response["nonce"]..":"..response["cnonce"]..":"..response.authzid; 209 A1 = Y..":"..response["nonce"]..":"..response["cnonce"]..":"..response.authzid;
210 else 210 else
211 return "failure", "invalid-authzid"; 211 return "failure", "invalid-authzid";

mercurial