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

(cherry picked from commit 8919c8b014)

Co-authored-by: Jguer <joao.guerreiro@grafana.com>
This commit is contained in:
Grot (@grafanabot)
2022-05-20 08:53:11 +02:00
committed by GitHub
co-authored by Jguer
parent f9d50206bd
commit 03a904c308
+1 -1
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