[KDE/Mac] Review Request 121159: add recovery from KWallet errors in mailtransport
René J.V. Bertin
rjvbertin at gmail.com
Mon Nov 17 22:07:23 UTC 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/121159/#review70548
-----------------------------------------------------------
Before anyone comments on it: I forgot to mention that comments starting with `RJVB` are there to explain changes and are intended to be removed at the end of the review process (or at least 'sanitised').
- René J.V. Bertin
On Nov. 17, 2014, 9:05 p.m., René J.V. Bertin wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/121159/
> -----------------------------------------------------------
>
> (Updated Nov. 17, 2014, 9:05 p.m.)
>
>
> Review request for KDE Software on Mac OS X and KDEPIM-Libraries.
>
>
> Repository: kdepimlibs
>
>
> Description
> -------
>
> The akonadi mail transport service cannot currently recover from KWallet errors because it treats them as persistent. A common case of error is a timeout during an (asynchronous?) unlock of the NetworkWallet in order to obtain the authentication credentials for an smtp server.
> When this happens, the mail transport service will consider the KWallet to be unavailable and force the user to enter the credentials manually, even storing it in an unsecure manner in its configuration file if the user elects to store the password.
>
> This patch adds recovery from KWallet errors by not using the stored error state, instead repeating the attempt to access the wallet the next time credentials have to be fetched. Instead of checking for the error flag, the check for KWallet::isEnabled() is done, before attempting to use other wallet functionality.
>
> I don't think there is any reason to treat KWallet errors as persistent because they probably aren't most of the time and thus the user ought not be obliged to restart the mail transport agent to clear the error state.
> I realise it's possible the error persistency was introduced to allow certain users to "disable" the wallet feature *only* for email sending; if so a less hackish solution with less side-effects ought to be possible.
>
>
> Diffs
> -----
>
> mailtransport/transportmanager.cpp d13f879
>
> Diff: https://git.reviewboard.kde.org/r/121159/diff/
>
>
> Testing
> -------
>
> On Linux with KDE PIM 4.13.3 and git/4.14 . On OS X 10.6.8 with KDE PIM 4.13.3 .
>
> The patch works as expected: when a wallet unlock times out, the mail transport's own authentication dialog is posted as usual. When cancelled, the dispatch attempt fails as expected, but a second attempt is made almost immediately; if the wallet dialog was used to unlock the wallet this attempt will succeed normally.
>
>
> Thanks,
>
> René J.V. Bertin
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-mac/attachments/20141117/5983daaf/attachment-0001.html>
More information about the kde-mac
mailing list