Skip to content

Commit

Permalink
Merge pull request #16271 from nuwang/forward_port_oidc_username_fix
Browse files Browse the repository at this point in the history
[23.0] Forward port of slugify username received from oidc
  • Loading branch information
martenson authored Jun 21, 2023
2 parents bd6b2e8 + 6544f0d commit 353359f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/galaxy/authnz/custos_authnz.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +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)
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
Expand Down

0 comments on commit 353359f

Please sign in to comment.