Skip to content

Expand character set of usernames created by Omniauth

username-removed-35056 requested to merge (removed):auth_hash_fix into master

When a user is created by Omniauth, Gitlab tries to assign the username based on the information provided in the auth hash. If no nickname is present, it uses the part of the email address before the @. This portion of the email address is run through the parameterize method, presumably to convert Unicode characters to ASCII.

parameterize strips out a number of characters that are valid in usernames. For example, john.doe is a valid Gitlab username, but parameterize will turn this into john-doe.

Instead of parameterize, this merge request uses normalize to convert non-ascii characters. This allows all acceptable characters to be used when creating a username from an email address.

Merge request reports