mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-21 21:51:10 -04:00
Fix GPG email checking to be case insensitive (#1988)
This commit is contained in:
parent
6678593b3c
commit
1a906f800d
2 changed files with 41 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue