mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Fix GPG email checking to be case insensitive (#1988)
This commit is contained in:
@@ -211,9 +211,9 @@ func parseGPGKey(ownerID int64, e *openpgp.Entity) (*GPGKey, error) {
|
||||
emails := make([]*EmailAddress, len(e.Identities))
|
||||
n := 0
|
||||
for _, ident := range e.Identities {
|
||||
|
||||
email := strings.ToLower(strings.TrimSpace(ident.UserId.Email))
|
||||
for _, e := range userEmails {
|
||||
if e.Email == ident.UserId.Email && e.IsActivated {
|
||||
if e.Email == email && e.IsActivated {
|
||||
emails[n] = e
|
||||
break
|
||||
}
|
||||
|
Reference in New Issue
Block a user