Skip to content

Commit

Permalink
Merge pull request #23 from agjacome/master
Browse files Browse the repository at this point in the history
Use lowercased username in login handshake to match signature in letter casing again.
  • Loading branch information
hrkfdn committed Sep 4, 2015
2 parents 5a05d5b + a332e54 commit 306c901
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions audioscrobbler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,9 @@ CAudioScrobbler::Handshake()
std::string authtoken(md5sum((char*)"%s%s", username.c_str(), Config->getLPassword().c_str()));

std::ostringstream query, sig;
query << "method=auth.getMobileSession&username=" << Config->getLUsername() << "&authToken=" << authtoken << "&api_key=" << APIKEY;
query << "method=auth.getMobileSession&username=" << username << "&authToken=" << authtoken << "&api_key=" << APIKEY;

sig << "api_key" << APIKEY << "authToken" << authtoken << "methodauth.getMobileSessionusername" << Config->getLUsername() << SECRET;
sig << "api_key" << APIKEY << "authToken" << authtoken << "methodauth.getMobileSessionusername" << username << SECRET;
std::string sighash(md5sum((char*)"%s", sig.str().c_str()));

query << "&api_sig=" << sighash;
Expand Down

0 comments on commit 306c901

Please sign in to comment.