util.sasl: Allow authzid=username (for compatibility with Smack's non-compliant behav...
authorWaqas Hussain <waqas20@gmail.com>
Fri, 13 Nov 2009 01:10:46 +0000 (06:10 +0500)
committerWaqas Hussain <waqas20@gmail.com>
Fri, 13 Nov 2009 01:10:46 +0000 (06:10 +0500)
util/sasl.lua

index 9073a6402a6536c583e909dd5628055163676cce..1a0b4e2fe81b93f439778cccb9ddc5602a54050f 100644 (file)
@@ -203,7 +203,7 @@ local function new_digest_md5(realm, credentials_handler)
                        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;