fxb / javascript-last.fm-api

last.fm API bindings for JavaScript
http://lastfm.felixbruns.de/javascript-last.fm-api/
308 stars 53 forks source link

small bug in getApiSignature (with fix) #6

Closed etx closed 9 years ago

etx commented 13 years ago

Hey!

Thanks for the very useful code, it's great. I found a small bug.

In getApiSignature at line 832 you're using for(var index in keys). This was causing the functions in my array prototype to be added to the string that is used to build the MD5 hash. Switching it to this (below) fixed it right up. I'd commit a patch or something but I'm no good at git.

for(var i=0; i<keys.length; i++){ var key = keys[i]; string += key + params[key]; }

fxb commented 9 years ago

Fixed.