[Pidgin] #7734: XMPP avatar code calculating wrong checksum

Pidgin trac at pidgin.im
Tue Dec 9 03:29:37 EST 2008


#7734: XMPP avatar code calculating wrong checksum
------------------------+---------------------------------------------------
 Reporter:  darkrain42  |     Owner:  deryni
     Type:  patch       |    Status:  new   
Component:  XMPP        |   Version:  2.5.2 
 Keywords:              |  
------------------------+---------------------------------------------------
 The User Avatar code currently generates the SHA1 hash by hand, but misses
 the corner case where one of the bytes starts with a '0' (as in
 499a40239a79'''0c'''80af91ef71213d7dad213d'''06'''16, where the code
 calculates the hash as  where the user avatar code computes the hash as
 499a40239a79'''c'''80af91ef71213d7dad213d'''6'''16)

 This results in a lot of needless traffic to the server to retrieve an
 ''updated'' avatar that is actually the same.

 The attached patch changes all the remaining uses (in the avatar code) of
 generating a sha1 to use purple_util_get_image_checksum.

-- 
Ticket URL: <http://developer.pidgin.im/ticket/7734>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list