Skip to content

Commit 8282697

Browse files
zeripathlunny
andauthored
Keys should not verify revoked email addresses (#12486) (#12495)
Backport #12486 Fix #6778 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
1 parent ec48618 commit 8282697

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

models/gpg_key.go

+3
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,9 @@ func parseGPGKey(ownerID int64, e *openpgp.Entity) (*GPGKey, error) {
286286

287287
emails := make([]*EmailAddress, 0, len(e.Identities))
288288
for _, ident := range e.Identities {
289+
if ident.Revocation != nil {
290+
continue
291+
}
289292
email := strings.ToLower(strings.TrimSpace(ident.UserId.Email))
290293
for _, e := range userEmails {
291294
if e.Email == email {

0 commit comments

Comments
 (0)