pidgin: fc48e138: jabber: Make the reliance on stream ID l...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Fri Aug 27 02:53:23 EDT 2010


----------------------------------------------------------------------
Revision: fc48e1385d53f406de694f252adc2fd368ba1277
Parent:   1fa9e4afdd810001996bc2b829fd6027f21a882f
Author:   darkrain42 at pidgin.im
Date:     08/27/10 01:14:08
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/fc48e1385d53f406de694f252adc2fd368ba1277

Changelog: 

jabber: Make the reliance on stream ID laxer.  Closes #12331

The requirement that there be an ID on the responder's header was
underspecified/just a SHOULD (depending on how you read it)
in rfc3920.

Changes against parent 1fa9e4afdd810001996bc2b829fd6027f21a882f

  patched  ChangeLog
  patched  libpurple/protocols/jabber/parser.c

-------------- next part --------------
============================================================
--- ChangeLog	71ce3ef99433f91f53311875015eb3b49d6f5814
+++ ChangeLog	bcad2b5d654ade87781e4fcd2dfb2c64de6514e2
@@ -16,6 +16,8 @@ version 2.7.4 (MM/DD/YYYY):
 	* Fix a crash when multiple accounts are simultaneously performing
 	  SASL authentication when built with Cyrus SASL support.  (thanks
 	  to Jan Kaluza) (#11560)
+	* Restore the ability to connect to XMPP servers that do not offer
+	  Stream ID. (#12331)
 
 	Yahoo/Yahoo JAPAN:
 	* Stop doing unnecessary lookups of certain alias information.  This
============================================================
--- libpurple/protocols/jabber/parser.c	cb0b0f6d7ce8ae78749be3b7aadeb1ca5143e939
+++ libpurple/protocols/jabber/parser.c	ef705d432576972f7888419626b57e83bf60d916
@@ -93,10 +93,22 @@ jabber_parser_element_start_libxml(void 
 			}
 		}
 
-		if (js->stream_id == NULL)
+		if (js->stream_id == NULL) {
+#if 0
+			/* This was underspecified in rfc3920 as only being a SHOULD, so
+			 * we cannot rely on it.  See #12331 and Oracle's server.
+			 */
 			purple_connection_error_reason(js->gc,
 					PURPLE_CONNECTION_ERROR_AUTHENTICATION_IMPOSSIBLE,
 					_("XMPP stream missing ID"));
+#else
+			/* Instead, let's make up a fancy-schmancy stream ID, which
+			 * we need to do because we flag on js->stream_id == NULL being
+			 * a special case in this function.
+			 */
+			js->stream_id = purple_uuid_random();
+#endif
+		}
 	} else {
 
 		if(js->current)


More information about the Commits mailing list