diff libpurple/protocols/jabber/presence.c @ 30031:9f59abd49def

jabber: Validate the hash on incoming BoB objects (in case the CID is on the form algo+hash@bob.xmpp.org).
author Marcus Lundblad <ml@update.uu.se>
date Mon, 22 Mar 2010 21:34:17 +0000
parents 40fee5f86bf8
children b0f8dcab7b43 ae615b3d3e47
line wrap: on
line diff
--- a/libpurple/protocols/jabber/presence.c	Mon Mar 22 20:15:55 2010 +0000
+++ b/libpurple/protocols/jabber/presence.c	Mon Mar 22 21:34:17 2010 +0000
@@ -457,7 +457,7 @@
 
 			data = purple_base64_decode(text, &size);
 			if (data) {
-				gchar *hash = jabber_calculate_data_sha1sum(data, size);
+				gchar *hash = jabber_calculate_data_hash(data, size, "sha1");
 				purple_buddy_icons_set_for_user(js->gc->account, from, data,
 				                                size, hash);
 				g_free(hash);