pidgin: 945ef5ab: jabber: Only add the ga:client-uses-full...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Sat May 1 12:45:46 EDT 2010


-----------------------------------------------------------------
Revision: 945ef5abc5bde7ed1e8e8417cee90550cfe1c0b0
Ancestor: c4fac586e2a3b1524463d90f3af97208cc00a5ee
Author: darkrain42 at pidgin.im
Date: 2010-05-01T16:37:07
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/945ef5abc5bde7ed1e8e8417cee90550cfe1c0b0

Modified files:
        ChangeLog libpurple/protocols/jabber/auth_cyrus.c
        libpurple/protocols/jabber/auth_plain.c

ChangeLog: 

jabber: Only add the ga:client-uses-full-bind-result to gmail/googlemail domains

I think this should be okay, but admittedly it might cause issues.  Anyway,
the previous one definitely caused issues with Punjab, which fails to
stringify the namespaced attributes.

-------------- next part --------------
============================================================
--- ChangeLog	ad24c34639f76786874ee8bfc15b6d249fe009f1
+++ ChangeLog	10ac6af6a92794d623a1644d456a3ce87c382273
@@ -96,6 +96,11 @@ version 2.7.0 (??/??/????):
 	  minutes).  This fixes an issue with Openfire disconnecting a
 	  libpurple-baesd client that has just been quiet for about 6
 	  minutes.
+	* Only support Google Talk's JID Domain Discovery extension
+	  (allowing a user to log in with "@gmail.com" or "@googlemail.com"
+	  interchangeably) for those two domains.  This change was made
+	  due to interoperability issues with some BOSH Connection Managers
+	  and namespaced attributes.
 
 	Yahoo/Yahoo JAPAN:
 	* Attempt to better handle transparent proxies interfering with
============================================================
--- libpurple/protocols/jabber/auth_cyrus.c	42c0a8cc33900006414ea216b7e68014ababa66f
+++ libpurple/protocols/jabber/auth_cyrus.c	ea44881795aca9d4a6d2926935a069f284278479
@@ -314,8 +314,11 @@ jabber_auth_start_cyrus(JabberStream *js
 		xmlnode_set_namespace(auth, NS_XMPP_SASL);
 		xmlnode_set_attrib(auth, "mechanism", js->current_mech);
 
-		xmlnode_set_attrib(auth, "xmlns:ga", "http://www.google.com/talk/protocol/auth");
-		xmlnode_set_attrib(auth, "ga:client-uses-full-bind-result", "true");
+		if (g_str_equal(js->user->domain, "gmail.com") ||
+				g_str_equal(js->user->domain, "googlemail.com")) {
+			xmlnode_set_attrib(auth, "xmlns:ga", "http://www.google.com/talk/protocol/auth");
+			xmlnode_set_attrib(auth, "ga:client-uses-full-bind-result", "true");
+		}
 
 		if (clientout) {
 			if (coutlen == 0) {
============================================================
--- libpurple/protocols/jabber/auth_plain.c	89fee941485f6311cbecacec9b3f1d9b87d68d85
+++ libpurple/protocols/jabber/auth_plain.c	f1a7627d8d70b57069a6949ab31a23a00bb6d993
@@ -40,8 +40,11 @@ static xmlnode *finish_plaintext_authent
 	auth = xmlnode_new("auth");
 	xmlnode_set_namespace(auth, NS_XMPP_SASL);
 
-	xmlnode_set_attrib(auth, "xmlns:ga", "http://www.google.com/talk/protocol/auth");
-	xmlnode_set_attrib(auth, "ga:client-uses-full-bind-result", "true");
+	if (g_str_equal(js->user->domain, "gmail.com") ||
+			g_str_equal(js->user->domain, "googlemail.com")) {
+		xmlnode_set_attrib(auth, "xmlns:ga", "http://www.google.com/talk/protocol/auth");
+		xmlnode_set_attrib(auth, "ga:client-uses-full-bind-result", "true");
+	}
 
 	response = g_string_new("");
 	response = g_string_append_len(response, "\0", 1);


More information about the Commits mailing list