diff options
author | zeripath <art27@cantab.net> | 2020-08-16 09:44:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-16 09:44:34 +0100 |
commit | f50364a5b04cd42587d09075c3787b3f2486db19 (patch) | |
tree | 30351e2118865cf35fd104045efe4e16b96f2cd7 /models/gpg_key.go | |
parent | ac3cfad23dc08f24d2bb8914313162e281de7326 (diff) | |
download | gitea-f50364a5b04cd42587d09075c3787b3f2486db19.tar.gz gitea-f50364a5b04cd42587d09075c3787b3f2486db19.zip |
Keys should not verify revoked email addresses (#12486)
Fix #6778
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'models/gpg_key.go')
-rw-r--r-- | models/gpg_key.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/models/gpg_key.go b/models/gpg_key.go index 0fa9a0caf6..9e52ca8cad 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 { |