Version: 2.3.2 (using KDE 4.5.2) OS: Linux Fails to generate last.fm login cookie/token from tag 2.3.2 onwards (present in both 2.3.2 release and latest 2.4 git). From discussion in #amarok, it is believed this was introduced in git about two weeks before 2.3.2 was tagged. If a last.fm login cookie (i.e., a working last.fm login) is present from prior to this change, scrobbling and loving will work fine (although the "test login" button still shows failed). If the cookie is not present, a new one will not be generated, so last.fm login and subsequently scrobbling etc fail. Originally reported in #amarok, and tested with the method listed below. Downgrading to 2.3.1, logging into last.fm (which works, as does the test login button), and then moving back up to latest successfully restores last.fm connectivity. Reproducible: Always Steps to Reproduce: 1) Change or remove last.fm login details 2) Restore last.fm login details 3) Play music Actual Results: Scrobbling and loving tracks fails; toast notification in the corner of the window notes problems with last.fm connection Expected Results: Scrobbles correctly
same here, amarok git from today, i was involved in the discussion of this bug in #amarok, so feel free to ask for patch testing.
Confirmed by comment #1
Confirmed here too
commit d01e51eee853596aa04e377253c6f3d83b6483c3 Author: Rick W. Chen <stuffcorpse@archlinux.us> Date: Fri Oct 15 14:49:22 2010 +1300 Fix last.fm auth failure introduced by ec210e0cf3119818a1d359885b77f6ef21a86cea BUG: 253788 CCMAIL: kretschmann@kde.org diff --git a/src/services/lastfm/LastFmService.cpp b/src/services/lastfm/LastFmService.cpp index e039cea..05bb948 100644 --- a/src/services/lastfm/LastFmService.cpp +++ b/src/services/lastfm/LastFmService.cpp @@ -251,7 +251,7 @@ LastFmService::init() debug() << "username:" << QString( QUrl::toPercentEncoding( lastfm::ws::Username ) ); - const QString authToken = md5( m_userName.toUtf8() ) + md5( password.toUtf8() ); + const QString authToken = md5( ( m_userName + md5( password.toUtf8() ) ).toUtf8() ); // now authenticate w/ last.fm and get our session key if we don't have one if( sessionKey.isEmpty() ) diff --git a/src/services/lastfm/LastFmServiceSettings.cpp b/src/services/lastfm/LastFmServiceSettings.cpp index 07eb64b..4b51ba1 100644 --- a/src/services/lastfm/LastFmServiceSettings.cpp +++ b/src/services/lastfm/LastFmServiceSettings.cpp @@ -14,6 +14,8 @@ * this program. If not, see <http://www.gnu.org/licenses/>. * ****************************************************************************************/ +#define DEBUG_PREFIX "LastFmServiceSettings" + #include "LastFmServiceSettings.h" #include "core/support/Amarok.h" @@ -112,8 +114,8 @@ LastFmServiceSettings::testLogin() debug() << "username:" << QString( QUrl::toPercentEncoding( lastfm::ws::Username ) ); - const QString authToken = QString( md5( m_configDialog->kcfg_ScrobblerUsername->text().toUtf8() ) + - md5( m_configDialog->kcfg_ScrobblerPassword->text().toUtf8() ) ); + const QString authToken = md5( ( m_configDialog->kcfg_ScrobblerUsername->text() + + md5( m_configDialog->kcfg_ScrobblerPassword->text().toUtf8() ) ).toUtf8() ); // now authenticate w/ last.fm and get our session key QMap<QString, QString> query;
*** Bug 253923 has been marked as a duplicate of this bug. ***
*** Bug 254006 has been marked as a duplicate of this bug. ***