Don't encrypt with a public key for which the email matches,
authorColin Leroy <colin@colino.net>
Wed, 30 Apr 2014 20:37:15 +0000 (22:37 +0200)
committerColin Leroy <colin@colino.net>
Wed, 30 Apr 2014 20:37:15 +0000 (22:37 +0200)
but the UID is revoked or invalid.
Fixes bug #2389, "GnuPG: invalid/revoked user IDs accepted"

src/plugins/pgpcore/select-keys.c

index 30c9e0b..423675c 100644 (file)
@@ -308,6 +308,8 @@ fill_clist (struct select_keys_s *sk, const char *pattern, gpgme_protocol_t prot
 
                if (!uid->email)
                        continue;
+               if (uid->revoked || uid->invalid)
+                       continue;
                raw_mail = g_strdup(uid->email);
                extract_address(raw_mail);
                if (!strcasecmp(pattern, raw_mail)) {