util.sasl: Allow authzid=username (for compatibility with Smack's non-compliant behavior).

Fri, 13 Nov 2009 06:10:46 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Fri, 13 Nov 2009 06:10:46 +0500
changeset 2079
5334723fa24d
parent 2078
a5f154548154
child 2080
ca419b92a8c7

util.sasl: Allow authzid=username (for compatibility with Smack's non-compliant behavior).

util/sasl.lua file | annotate | diff | comparison | revisions
--- a/util/sasl.lua	Fri Nov 13 04:24:17 2009 +0500
+++ b/util/sasl.lua	Fri Nov 13 06:10:46 2009 +0500
@@ -203,7 +203,7 @@
 			elseif Y == false then return "failure", "account-disabled" end
 			local A1 = "";
 			if response.authzid then
-				if response.authzid == self.username.."@"..self.realm then
+				if response.authzid == self.username or response.authzid == self.username.."@"..self.realm then
 					-- COMPAT
 					log("warn", "Client is violating XMPP RFC. See section 6.1 of RFC 3920.");
 					A1 = Y..":"..response["nonce"]..":"..response["cnonce"]..":"..response.authzid;

mercurial