Make OIDC email matching case-insensitive

OIDC email matching is currently case-sensitive, in order to not create duplicate accounts when the internal Galaxy database and the OIDC provider do not agree on the case-sensitivity of emails, they should be validated without case-sensitivity. See https://github.com/galaxyproject/galaxy/issues/9981.
This commit is contained in:
selten
2021-01-28 20:13:56 +01:00
committed by GitHub
parent 2f3096790d
commit 5e8264f9ff
+1 -1
View File
@@ -6136,7 +6136,7 @@ class UserAuthnzToken(UserMixin, RepresentById):
@classmethod
def get_users_by_email(cls, email):
return cls.user_query().filter_by(email=email)
return cls.user_query().filter(func.lower(User.table.c.email) == email.lower())
@classmethod
def get_social_auth(cls, provider, uid):