pidgin: f1264b13: Attempt to handle transparent proxies th...

rekkanoryo at pidgin.im rekkanoryo at pidgin.im
Sat Mar 13 15:35:49 EST 2010


-----------------------------------------------------------------
Revision: f1264b136d57d1ee917f59945e91b9b2bd4b2410
Ancestor: 997227c2f1377349ccdaa38e45303d06bb893fdf
Author: rekkanoryo at pidgin.im
Date: 2010-03-13T20:24:52
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/f1264b136d57d1ee917f59945e91b9b2bd4b2410

Modified files:
        ChangeLog libpurple/protocols/yahoo/libymsg.c

ChangeLog: 

Attempt to handle transparent proxies that return documents instead of errors.
I think this fixes #11478.

-------------- next part --------------
============================================================
--- ChangeLog	4464a7a5f3f6a743eb81befb951355fe5d208338
+++ ChangeLog	f8d3ffb14e2692a2f80b56181de72ae61de11442
@@ -44,6 +44,10 @@ version 2.7.0 (??/??/????):
 	  with content (as opposed to a typing notification, etc).  (Thanks to
 	  rjoly for testing)
 
+	Yahoo:
+	* Attempt to better handle transparent proxies interfering with HTTP-based
+	  login.
+
 version 2.6.6 (02/18/2010):
 	libpurple:
 	* Fix 'make check' on OS X. (David Fang)
============================================================
--- libpurple/protocols/yahoo/libymsg.c	06a1c5e720657dd4ee795bd865be97fb559b2bf0
+++ libpurple/protocols/yahoo/libymsg.c	e3799dbd66b307186051113ea090105aee8324f7
@@ -1861,11 +1861,13 @@ static void yahoo_auth16_stage1_cb(Purpl
 
 		totalelements = g_strv_length(split_data);
 
-		if(totalelements == 1)
+		if(totalelements == 1) {
 			response_no = strtol(split_data[0], NULL, 10);
-		else if(totalelements >= 2) {
+		} else if(totalelements == 2 || totalelements == 3 ) {
 			response_no = strtol(split_data[0], NULL, 10);
 			token = g_strdup(split_data[1] + strlen("ymsgr="));
+		} else { /* It looks like a transparent proxy has returned an invalid document */
+			response_no = -1;
 		}
 
 		g_strfreev(split_data);


More information about the Commits mailing list