Problem/Motivation

OpenID connect doesn't check username on violations. Eg. a username should not contain a comma but those characters aren't checked / replaced.

Steps to reproduce

1. Setup an openID generic
2. Make sure the returned username is something like 'Lastname, Firstname'
3. Login with this account using SSO.
4. The user account is correctly created and username is filled in with the Lastname, firstname format
5. Try to edit the account.

The system will give you an error: "The username contains an illegal character."

Proposed resolution

Use the preg match replace option to remove any invalid character from the username

Comments

KevinVb created an issue. See original summary.

kevinvb’s picture

Status: Active » Needs review
StatusFileSize
new470 bytes

Provided a small patch which uses the pattern from the UserNameConstraintValidator.
Suggestions are welcome.

jeroent’s picture

StatusFileSize
new839 bytes

Another check that doesn't happen is the username length.

The external login provider I use, uses usernames longer that 60 characters, which results in a fatal error.

sanduhrs’s picture

Status: Needs review » Closed (duplicate)