Mercurial > pidgin
diff libpurple/protocols/jabber/parser.c @ 30449:ec12d2883266
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.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Fri, 27 Aug 2010 05:14:08 +0000 |
parents | 6e598ca344b3 |
children | 4072761e3454 |
line wrap: on
line diff
--- 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)