From f50364a5b04cd42587d09075c3787b3f2486db19 Mon Sep 17 00:00:00 2001 From: zeripath Date: Sun, 16 Aug 2020 09:44:34 +0100 Subject: [PATCH] Keys should not verify revoked email addresses (#12486) Fix #6778 Signed-off-by: Andrew Thornton --- models/gpg_key.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/models/gpg_key.go b/models/gpg_key.go index 0fa9a0caf6b..9e52ca8cad5 100644 --- a/models/gpg_key.go +++ b/models/gpg_key.go @@ -286,6 +286,9 @@ func parseGPGKey(ownerID int64, e *openpgp.Entity) (*GPGKey, error) { emails := make([]*EmailAddress, 0, len(e.Identities)) for _, ident := range e.Identities { + if ident.Revocation != nil { + continue + } email := strings.ToLower(strings.TrimSpace(ident.UserId.Email)) for _, e := range userEmails { if e.Email == email {