summaryrefslogtreecommitdiff
path: root/libpurple/protocols
diff options
context:
space:
mode:
authorJohn Bailey <rekkanoryo@rekkanoryo.org>2010-03-13 20:24:52 +0000
committerJohn Bailey <rekkanoryo@rekkanoryo.org>2010-03-13 20:24:52 +0000
commit98b8bc4e430897e0308924ec1c2ee4ac769f437d (patch)
treeef58460bdfbbab5b710defd6eabda798b79b63a7 /libpurple/protocols
parentae658305c15118e731cbfcf7f2796602d5f4d13e (diff)
downloadpidgin-98b8bc4e430897e0308924ec1c2ee4ac769f437d.tar.gz
Attempt to handle transparent proxies that return documents instead of errors.
I think this fixes #11478.
Diffstat (limited to 'libpurple/protocols')
-rw-r--r--libpurple/protocols/yahoo/libymsg.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libpurple/protocols/yahoo/libymsg.c b/libpurple/protocols/yahoo/libymsg.c
index 568489cf29..0874526533 100644
--- a/libpurple/protocols/yahoo/libymsg.c
+++ b/libpurple/protocols/yahoo/libymsg.c
@@ -1861,11 +1861,13 @@ static void yahoo_auth16_stage1_cb(PurpleUtilFetchUrlData *unused, gpointer user
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);