comparison libpurple/protocols/yahoo/yahoo_picture.c @ 23645:0044b8f3727a

Patch from "Chris G." to extend the yahoo privacy to picture requests to help avoid people using them to determine your IP. Fixes #6499
author Daniel Atallah <daniel.atallah@gmail.com>
date Tue, 05 Aug 2008 01:43:42 +0000
parents 25975a6a5b63
children 18a1f0fe5f40
comparison
equal deleted inserted replaced
23644:c07b2a2b1b62 23645:0044b8f3727a
25 25
26 #include "account.h" 26 #include "account.h"
27 #include "accountopt.h" 27 #include "accountopt.h"
28 #include "blist.h" 28 #include "blist.h"
29 #include "debug.h" 29 #include "debug.h"
30 #include "privacy.h"
30 #include "prpl.h" 31 #include "prpl.h"
31 #include "proxy.h" 32 #include "proxy.h"
32 #include "util.h" 33 #include "util.h"
33 34
34 #include "yahoo.h" 35 #include "yahoo.h"
105 checksum = strtol(pair->value, NULL, 10); 106 checksum = strtol(pair->value, NULL, 10);
106 break; 107 break;
107 } 108 }
108 109
109 l = l->next; 110 l = l->next;
111 }
112
113 if (!purple_privacy_check(purple_connection_get_account(gc), who)) {
114 purple_debug_info("yahoo", "Picture packet from %s dropped.\n", who);
115 return;
110 } 116 }
111 117
112 /* Yahoo IM 6 spits out 0.png as the URL if the buddy icon is not set */ 118 /* Yahoo IM 6 spits out 0.png as the URL if the buddy icon is not set */
113 if (who && got_icon_info && url && !g_ascii_strncasecmp(url, "http://", 7)) { 119 if (who && got_icon_info && url && !g_ascii_strncasecmp(url, "http://", 7)) {
114 /* TODO: make this work p2p, try p2p before the url */ 120 /* TODO: make this work p2p, try p2p before the url */