OAuth: make oauth case insensitive match for email (#49252)

This commit is contained in:
Jguer 2022-05-19 15:48:29 +00:00 committed by GitHub
parent 8a87db2743
commit 8919c8b014
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ func isEmailAllowed(email string, allowedDomains []string) bool {
valid := false
for _, domain := range allowedDomains {
emailSuffix := fmt.Sprintf("@%s", domain)
valid = valid || strings.HasSuffix(email, emailSuffix)
valid = valid || strings.HasSuffix(strings.ToLower(email), strings.ToLower(emailSuffix))
}
return valid