pidgin.2.6.3: c8d72361: *** Plucked rev 781682333aea0c801d280c35...

markdoliner at pidgin.im markdoliner at pidgin.im
Fri Oct 16 06:02:50 EDT 2009


-----------------------------------------------------------------
Revision: c8d72361e5c9828c476ac5cb94f17584b1f407f9
Ancestor: f3af09d4c4ebfd2fee42a484e963728a889495e0
Author: markdoliner at pidgin.im
Date: 2009-10-16T09:18:42
Branch: im.pidgin.pidgin.2.6.3
URL: http://d.pidgin.im/viewmtn/revision/info/c8d72361e5c9828c476ac5cb94f17584b1f407f9

Modified files:
        ChangeLog libpurple/certificate.c
        libpurple/protocols/oscar/oscar.c
        libpurple/protocols/oscar/oscar.h

ChangeLog: 

*** Plucked rev 781682333aea0c801d280c3507ee25552a60bfc0 (markdoliner at pidgin.im):
Fix a remote-crash bug in ICQ (and probably AIM).  It happens when the
SIM IM client tries to send us contacts.

Fixes #10481

*** Plucked rev b988b4d536524e124366b7da01b0e8706ac0a099 (markdoliner at pidgin.im):
Don't call aim_src_clientready() until we have activated our feedbag
(and also until after we have our bos rights, but I'm not sure if that
matters).  This fixes the bug where AIM block lists recently stopped
working.  I imagine AIM permit lists were also broken, as well as the
three ICQ privacy lists.

It's conceivable that this will also fix the bug where your contact
list is sometimes empty, but I have no evidence to support that either
way.

This change will be in the next release of Pidgin, 2.6.3, which will
probably be released within the next week.

Thanks to AOL for telling me what we were doing wrong.

Fixes #10489
Fixes #10499
Fixes #10509
Refs #10411

*** Plucked rev e5cd28dabffaedf15ae16dd9dfb64e2c0fe40e8c (darkrain42 at pidgin.im):
printf(\"%s\", NULL) when a cert has no CN. Refs #10519.

This is a temporary change to keep it from crashing while not introducing
a string change.

*** Plucked rev a98871332460101c6e9638650081c8badad3066b (darkrain42 at pidgin.im):
Print that specific message only when there is a CN; otherwise fall back
to the error from invalidity_reason_to_string().  Fixes #10519.

Thanks for pointing this out, QuLogic.


-------------- next part --------------
============================================================
--- ChangeLog	980ba2e5b94406e39d4e1b9a240f635a6b556e0f
+++ ChangeLog	5d51169d4112dd8cce3d8940b079d8a4438fb805
@@ -1,6 +1,10 @@ versoin 2.6.3 (10/16/2009):
 Pidgin and Finch: The Pimpin' Penguin IM Clients That're Good for the Soul
 
 versoin 2.6.3 (10/16/2009):
+	AIM and ICQ:
+	* Fix a crash when some clients send contacts in a format we don't
+	  understand.
+	* Fix blocking and other privacy list problems.
 
 version 2.6.2 (09/05/2009):
 	libpurple:
============================================================
--- libpurple/certificate.c	6a6b0229904620379138cdb8c6f8333c326c4717
+++ libpurple/certificate.c	10c9872839abced12ccf9b3a0405a69cb6b3008b
@@ -1402,13 +1402,15 @@ x509_tls_cached_complete(PurpleCertifica
 		if (flags & PURPLE_CERTIFICATE_NAME_MISMATCH) {
 			gchar *sn = purple_certificate_get_subject_name(peer_crt);
 
-			g_string_append_printf(errors, _("The certificate claims to be "
-						"from \"%s\" instead. This could mean that you are "
-						"not connecting to the service you believe you are."),
-						sn);
-			g_free(sn);
+			if (sn) {
+				g_string_append_printf(errors, _("The certificate claims to be "
+							"from \"%s\" instead. This could mean that you are "
+							"not connecting to the service you believe you are."),
+							sn);
+				g_free(sn);
 
-			flags &= ~PURPLE_CERTIFICATE_NAME_MISMATCH;
+				flags &= ~PURPLE_CERTIFICATE_NAME_MISMATCH;
+			}
 		}
 
 		while (i != PURPLE_CERTIFICATE_LAST) {
============================================================
--- libpurple/protocols/oscar/oscar.c	bd6e9141aed032101cc2031cf3601bef28e73af1
+++ libpurple/protocols/oscar/oscar.c	4746634556dd2192cdcb8cd9a64f6fb094753241
@@ -2868,25 +2868,46 @@ incomingim_chan4(OscarData *od, FlapConn
 			gchar **text;
 			text = g_strsplit(args->msg, "\376", 0);
 			if (text) {
-				num = 0;
-				for (i=0; i<strlen(text[0]); i++)
-					num = num*10 + text[0][i]-48;
-				for (i=0; i<num; i++) {
-					struct name_data *data = g_new(struct name_data, 1);
-					gchar *message = g_strdup_printf(_("ICQ user %u has sent you a buddy: %s (%s)"), args->uin, text[i*2+2], text[i*2+1]);
-					data->gc = gc;
-					data->name = g_strdup(text[i*2+1]);
-					data->nick = g_strdup(text[i*2+2]);
+				/* Read the number of contacts that we were sent */
+				errno = 0;
+				num = strtoul(text[0], NULL, 10);
 
-					purple_request_action(gc, NULL, message,
-										_("Do you want to add this buddy "
-										  "to your buddy list?"),
-										PURPLE_DEFAULT_ACTION_NONE,
-										purple_connection_get_account(gc), data->name, NULL,
-										data, 2,
-										_("_Add"), G_CALLBACK(purple_icq_buddyadd),
-										_("_Decline"), G_CALLBACK(oscar_free_name_data));
-					g_free(message);
+				if (num > 0 && errno == 0) {
+					for (i=0; i<num; i++) {
+						struct name_data *data;
+						gchar *message;
+
+						if (!text[i*2 + 1] || !text[i*2 + 2]) {
+							/* We're missing the contact name or nickname.  Bail out. */
+							gchar *tmp = g_strescape(args->msg, NULL);
+							purple_debug_error("oscar", "Unknown syntax parsing "
+									"ICQ buddies.  args->msg=%s\n", tmp);
+							g_free(tmp);
+							break;
+						}
+
+						message = g_strdup_printf(_("ICQ user %u has sent you a buddy: %s (%s)"), args->uin, text[i*2+2], text[i*2+1]);
+
+						data = g_new(struct name_data, 1);
+						data->gc = gc;
+						data->name = g_strdup(text[i*2+1]);
+						data->nick = g_strdup(text[i*2+2]);
+
+						purple_request_action(gc, NULL, message,
+								_("Do you want to add this buddy "
+								  "to your buddy list?"),
+								PURPLE_DEFAULT_ACTION_NONE,
+								purple_connection_get_account(gc), data->name, NULL,
+								data, 2,
+								_("_Add"), G_CALLBACK(purple_icq_buddyadd),
+								_("_Decline"), G_CALLBACK(oscar_free_name_data));
+						g_free(message);
+					}
+				} else {
+					gchar *tmp = g_strescape(args->msg, NULL);
+					purple_debug_error("oscar", "Unknown syntax parsing "
+							"ICQ buddies.  args->msg=%s\n", tmp);
+					g_free(tmp);
 				}
 				g_strfreev(text);
 			}
@@ -3901,12 +3922,8 @@ static int purple_bosrights(OscarData *o
 	od->rights.maxpermits = (guint)maxpermits;
 	od->rights.maxdenies = (guint)maxdenies;
 
-	purple_connection_set_state(gc, PURPLE_CONNECTED);
-
 	purple_debug_info("oscar", "buddy list loaded\n");
 
-	aim_srv_clientready(od, conn);
-
 	if (purple_account_get_user_info(account) != NULL)
 		serv_set_info(gc, purple_account_get_user_info(account));
 
@@ -3949,6 +3966,22 @@ static int purple_bosrights(OscarData *o
 	aim_srv_requestnew(od, SNAC_FAMILY_ALERT);
 	aim_srv_requestnew(od, SNAC_FAMILY_CHATNAV);
 
+	od->bos.have_rights = TRUE;
+
+	/*
+	 * If we've already received our feedbag data then we're not waiting on
+	 * anything else, so send the server clientready.
+	 *
+	 * Normally we get bos rights before we get our feedbag data, so this
+	 * rarely (never?) happens.  And I'm not sure it actually matters if we
+	 * wait for bos rights before calling clientready.  But it seems safer
+	 * to do it this way.
+	 */
+	if (od->ssi.received_data) {
+		aim_srv_clientready(od, conn);
+		purple_connection_set_state(gc, PURPLE_CONNECTED);
+	}
+
 	return 1;
 }
 
@@ -5388,6 +5421,15 @@ static int purple_ssi_parselist(OscarDat
 	oscar_set_icon(gc, img);
 	purple_imgstore_unref(img);
 
+	/*
+	 * If we've already received our bos rights then we're not waiting on
+	 * anything else, so send the server clientready.
+	 */
+	if (od->bos.have_rights) {
+		aim_srv_clientready(od, conn);
+		purple_connection_set_state(gc, PURPLE_CONNECTED);
+	}
+
 	return 1;
 }
 
============================================================
--- libpurple/protocols/oscar/oscar.h	99102878d1c14ad9a0e1a6fdb5ce236ea69b9b22
+++ libpurple/protocols/oscar/oscar.h	4f9a8243e6fb7a2a59a6b095f46cf2c1ccf6ddfc
@@ -535,6 +535,10 @@ struct _OscarData
 		struct aim_userinfo_s *userinfo;
 	} locate;
 
+	struct {
+		gboolean have_rights;
+	} bos;
+
 	/* Server-stored information (ssi) */
 	struct {
 		gboolean received_data;


More information about the Commits mailing list