Bug 383279 - Kmail unnecessarily prompts for passwords
Summary: Kmail unnecessarily prompts for passwords
Status: RESOLVED FIXED
Alias: None
Product: kdepim
Classification: Applications
Component: general (show other bugs)
Version: GIT (master)
Platform: Neon Linux
: NOR normal with 21 votes (vote)
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-08 14:33 UTC by Karsten Künne
Modified: 2019-11-26 08:33 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 19.12.0


Attachments
Patch to fix the issue (applies to 19.08.2) (2.04 KB, patch)
2019-11-03 01:57 UTC, Mia Herkt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Karsten Künne 2017-08-08 14:33:34 UTC
Since I upgraded Kmail from 16.08.2 to 17.04.2 (openSUSE Leap 42.2 to 42.3) Kmail prompts me for passwords on my IMAP accounts every 10 minutes or so. All of my IMAP accounts are configured to use GSSAPI authentication and don't use a password at all (they use my Kerberos ticket for authentication). I have to click OK with an empty password field in order to make the password window disappear. This is very annoying and it started with openSUSE 42.3, Kmail 17.04.2. It could also be Akonadi or some other component doing the password prompting, I can't really tell. The end result is the same for me.
Comment 1 abyss.andrey 2017-09-14 06:35:03 UTC
I can confirm this problem in general. Kmail asks for a password at startup or once I click some folder (not synchronized before) for IMAP account with GSSAPI auth.

Asking for password every 5-10 minutes was fixed in https://bugs.kde.org/show_bug.cgi?id=311456

KDE neon 5.10
KDE Plasma 5.10.5
KDE Frameworks 5.38.0
KDE Applications 17.08.1
Qt 5.9.1
Comment 2 abyss.andrey 2017-09-14 07:10:15 UTC
I think some more places in code should not check password emptiness for GSSAPI account, for example I can not change subscription right clicking on account in folders tree.
Probably because of this piece of code https://cgit.kde.org/kdepim-runtime.git/tree/resources/imap/imapresourcebase.cpp#n262
Comment 3 markus hetzenecker 2017-11-22 15:49:13 UTC
I confirm this bug, please fix again kmail with GSSAPI.
installed packages:
kf5-plasma-5.40.0-1.fc27.x86_64
kmail-17.08.1-1.fc27.x86_64
Comment 4 abyss.andrey 2017-12-20 13:00:24 UTC
The bug still present in kdepim-runtime 17.12.0-0neon+16.04+xenial+build38

It asks password once on startup.
Comment 5 Karsten Künne 2018-08-10 14:47:10 UTC
It got better in kmail-17.12.3 (Leap 15.0) but it still occasionally prompts for password despite GSSAPI authentication. I think I got the prompt on startup and sometimes if I click "Check Mail" or so.
Comment 6 abyss.andrey 2018-09-07 04:38:05 UTC
It is still valid in 18.08.1
kdepim-runtime/xenial,now 4:18.08.1-0xneon+16.04+xenial+build64 amd64
Comment 7 abyss.andrey 2018-12-14 04:44:36 UTC
It is still present in 18.12

kdepim-runtime/bionic,now 4:18.12.0-0xneon+18.04+bionic+build17
Comment 8 Mia Herkt 2019-11-03 00:48:25 UTC
This actually happens in kdepim-runtime/resources/imap/sessionpool.cpp. There’s some code to ensure that no password is requested for GSSAPI, but it’s not used in all cases.
Comment 9 Mia Herkt 2019-11-03 01:57:59 UTC
Created attachment 123677 [details]
Patch to fix the issue (applies to 19.08.2)
Comment 10 Christophe Giboudeaux 2019-11-26 08:26:51 UTC
*** Bug 414013 has been marked as a duplicate of this bug. ***
Comment 11 Christophe Giboudeaux 2019-11-26 08:33:35 UTC
Git commit 163968040f4b9201e47b98e00cf686b2c6f2f97f by Christophe Giboudeaux, on behalf of Martin Herkt.
Committed on 26/11/2019 at 08:33.
Pushed by cgiboudeaux into branch 'release/19.12'.

IMAP resource: do not prompt for password with GSSAPI auth

Summary:
GSSAPI (e.g. when used with Kerberos) does not use passwords, so make sure the user is not prompted unnecessarily.
FIXED-IN: 19.12.0

Reviewers: dvratil

Reviewed By: dvratil

Subscribers: dvratil, kde-pim

Tags: #kde_pim

Differential Revision: https://phabricator.kde.org/D25499

M  +12   -7    resources/imap/sessionpool.cpp
M  +1    -0    resources/imap/sessionpool.h

https://commits.kde.org/kdepim-runtime/163968040f4b9201e47b98e00cf686b2c6f2f97f