After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 531439 - Evolution gpg askpass deletes passwords in gnome-keyring
Evolution gpg askpass deletes passwords in gnome-keyring
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: general
2.22.x (obsolete)
Other All
: Normal normal
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
evolution[passwords]
Depends on:
Blocks:
 
 
Reported: 2008-05-04 20:46 UTC by Vitezslav Kotrla
Modified: 2008-05-19 14:33 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Proposed patch (2.18 KB, patch)
2008-05-16 18:52 UTC, Matthew Barnes
committed Details | Review

Description Vitezslav Kotrla 2008-05-04 20:46:48 UTC
Please describe the problem:
When viewing GPG/PGP encrypted message, user is asked for passphrase. When user refuses to give passphrase and cancels dialog, mail passwords stored in the gnome-keyring are deleted.

Steps to reproduce:
1. Send GPG/PGP encrypted message to yourself
2. When message is delivered, try to open it
3. You are asked for passphare to your secret GPG/PGP key, refuse and cancel dialog
4. Try to send & receive new mail, you are asked for POP3/IMAP/SMTP password
5. Run seahorse and check stored mail passwords, they are all gone.

Actual results:


Expected results:


Does this happen every time?
Yes

Other information:
I'm running seahorse 2.22.1 and evolution 2.22.1.

Similar behavior is reported in Arch Linux BTS:

   http://bugs.archlinux.org/task/10339
Comment 1 sutton 2008-05-09 22:39:05 UTC
Reported in Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/evolution/+bug/228794

I am also having this same issue.  Evolution 2.22.1.1 and gpg 1.4.6
Comment 2 Matt McCutchen 2008-05-16 04:41:30 UTC
I have this problem too on Fedora 9 with evolution-2.22.1-2.fc9.i386 when I sign outgoing messages.  The passwords are lost as soon as the passphrase dialog opens; whether I click OK or Cancel is irrelevant.  And as mentioned in this comment:

https://bugs.launchpad.net/ubuntu/+source/evolution/+bug/228794/comments/6

if I check the box to "Remember this passphrase for the remainder of this session", then sending future signed messages bypasses the dialog and does not lose passwords.
Comment 3 Matthew Barnes 2008-05-16 18:52:47 UTC
Created attachment 111011 [details] [review]
Proposed patch

Evolution's password module is not equipped to store GPG passphrases in the keyring because it assumes all keys are URIs with user and host names.  GPG keys have neither, and thus causes some bad behavior in the keyring routines.  The patch adds some extra checks to prevent it.

Note: AFAICT, the password module does not and has not ever supported storing GPG passphrases in the keyring; it only caches them for the session.  This is probably a good thing: an external GPG agent, not Evolution, should really be managing the passphrases.  I just wanted to point out that this patch does not change that.  It only prevents other passwords from being destroyed.
Comment 4 Matt McCutchen 2008-05-17 21:55:41 UTC
I am now using a modified version of evolution-data-server that includes the patch from comment 3 along with two other changes, and indeed, it no longer loses passwords.  The RPMs for Fedora 9 are here for anyone who would like to test or use them:

http://mattmccutchen.net/private/evolution-531439/
Comment 5 Srinivasa Ragavan 2008-05-19 04:14:49 UTC
Commit to stable/trunk
Comment 6 Matthew Barnes 2008-05-19 14:33:26 UTC
Committed to trunk (revision 8814) and gnome-2-22 (revision 8815).