Bug 230181 - Kopete forgets WLM passwords if password prompt is cancelled
Summary: Kopete forgets WLM passwords if password prompt is cancelled
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Unmaintained
Component: WLM Plugin (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-10 10:46 UTC by Christopher January
Modified: 2011-03-08 03:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.6.2
Sentry Crash Report:


Attachments
Patch to not call setWrong if the password prompt was cancelled by the user. (557 bytes, patch)
2010-05-05 11:47 UTC, Christopher January
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher January 2010-03-10 10:46:12 UTC
Version:           1.0.0 (using 4.4.1 (KDE 4.4.1), 4.4.1-1.fc12 Fedora)
Compiler:          gcc
OS:                Linux (x86_64) release 2.6.32.9-67.fc12.x86_64

Steps to reproduce:
1. Set up a WLM account and store the password in kwallet.
2. Close Kopete and re-open it.
3. Wait for the kwallet password prompt to appear.
4. Ignore it.
5. After some time the kwallet password prompt will time out and Kopete's password prompt for the WLM account will appear.
6. Click cancel on Kopete's password prompt.
7. Close Kopete.
8. Re-open Kopete.
9. Wait for the kwallet password prompt to appear.
10. Enter your kwallet password.
11. Notice that the WLM account fails to connect with an invalid password error.

This only happens for WLM accounts. Other types of account remember their password if you cancel the password prompt.
Comment 1 Christopher January 2010-05-05 11:19:55 UTC
I've not heard anything re: this bug, but I now know the cause.
WlmAccount::connectWithPassword does this:
    if (pass.isEmpty ())
    {
        password ().setWrong (true);
        return;
    }
but pass may be empty if the password prompt dialog was cancelled. In that case KopetePasswordGetRequestPrompt::slotCancelPressed emits finished with QString::null as the password.
So calling setWrong is, err, wrong. Other protocols either call disconnect (e.g. JabberAccount::connectWithPassword ) or set the status to offline (YahooAccount::connectWithPassword).
Comment 2 Christopher January 2010-05-05 11:47:32 UTC
Created attachment 43263 [details]
Patch to not call setWrong if the password prompt was cancelled by the user.
Comment 3 Malte S. Stretz 2010-07-15 11:15:46 UTC
Related to bug 226270 but I didn't dup this one as it has a protocol specific patch.
Comment 4 Lamarque V. Souza 2011-02-28 10:00:20 UTC
SVN commit 1223106 by lvsouza:

Do not call setWrong if the password prompt has been cancelled by the user.
Thanks Christopher January for the patch.

BUG: 230181


 M  +1 -1      wlmaccount.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1223106
Comment 5 Lamarque V. Souza 2011-02-28 10:02:22 UTC
SVN commit 1223107 by lvsouza:

Backport r1223106 by lvsouza from trunk to the 4.6 branch:

Do not call setWrong if the password prompt has been cancelled by the user.
Thanks Christopher January for the patch.

CCBUG: 230181


 M  +1 -1      wlmaccount.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1223107