pidgin: 0d389b1a: jabber: Un-assert-ify one failure case i...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Mon Jan 17 17:40:49 EST 2011


----------------------------------------------------------------------
Revision: 0d389b1a3f186fbbea57629066032e0fe9b7a47d
Parent:   03fc534b1353dfbeab5d8745896780b4424ab3ed
Author:   darkrain42 at pidgin.im
Date:     01/17/11 17:37:03
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/0d389b1a3f186fbbea57629066032e0fe9b7a47d

Changelog: 

jabber: Un-assert-ify one failure case in the Cyrus code.

Seen in a user's debug log, where the server sent back (slightly redacted):
<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl">[B at 10stuff</success>

Changes against parent 03fc534b1353dfbeab5d8745896780b4424ab3ed

  patched  libpurple/protocols/jabber/auth_cyrus.c

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/auth_cyrus.c	66c8538d1410b3e5320daef818adddc6abe931a3
+++ libpurple/protocols/jabber/auth_cyrus.c	26b1cc9c406dab09498c887bb8f72848290f96d1
@@ -520,9 +520,12 @@ jabber_cyrus_handle_success(JabberStream
 		g_free(dec_in);
 
 		if (js->sasl_state != SASL_OK) {
-			/* This should never happen! */
+			/* This happens when the server sends back jibberish
+			 * in the "additional data with success" case.
+			 * Seen with Wildfire 3.0.1.
+			 */
 			*error = g_strdup(_("Invalid response from server"));
-			g_return_val_if_reached(JABBER_SASL_STATE_FAIL);
+			return JABBER_SASL_STATE_FAIL;
 		}
 	}
 


More information about the Commits mailing list