# HG changeset patch # User Paul Aurich # Date 1282886048 0 # Node ID ec12d28832663ed05972c167a926bec2afa4b2bf # Parent a5131a257967f93aaa766c061dc4d84bcd6f492a 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. diff -r a5131a257967 -r ec12d2883266 ChangeLog --- a/ChangeLog Fri Aug 27 04:30:23 2010 +0000 +++ b/ChangeLog Fri Aug 27 05:14:08 2010 +0000 @@ -16,6 +16,8 @@ * 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 diff -r a5131a257967 -r ec12d2883266 libpurple/protocols/jabber/parser.c --- a/libpurple/protocols/jabber/parser.c Fri Aug 27 04:30:23 2010 +0000 +++ b/libpurple/protocols/jabber/parser.c Fri Aug 27 05:14:08 2010 +0000 @@ -93,10 +93,22 @@ } } - 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)