From b973d5ea5225e0dbb89eb32d880b085d14ed5471 Mon Sep 17 00:00:00 2001 From: nuwang <2070605+nuwang@users.noreply.github.com> Date: Thu, 14 Sep 2023 11:30:42 +0530 Subject: [PATCH] Also make sure that usernames are only lowercase --- lib/galaxy/authnz/custos_authnz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/authnz/custos_authnz.py b/lib/galaxy/authnz/custos_authnz.py index 6ecc16978061..58a6da91fcb6 100644 --- a/lib/galaxy/authnz/custos_authnz.py +++ b/lib/galaxy/authnz/custos_authnz.py @@ -380,7 +380,7 @@ def _username_from_userinfo(self, trans, userinfo): username = userinfo.get("preferred_username", userinfo["email"]) if "@" in username: username = username.split("@")[0] # username created from username portion of email - username = util.ready_name_for_url(username) + username = util.ready_name_for_url(username).lower() if trans.sa_session.query(trans.app.model.User).filter_by(username=username).first(): # if username already exists in database, append integer and iterate until unique username found count = 0