Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(username-validation): remove regex #240

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rosenbach
Copy link
Contributor

Right now there's a regex on the username property of the UserDto, which is a problem because:

  1. It is not configurable (the current regex is a problem for German names 😢)
  2. (and more important) Even if it is changed in the source code, the username will still be checked against the UserOptions.AllowedUserNameCharacters Property, which can be configured via appsettings (Defaults to abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._@+). So you would need to change the regex on two positions.

With the help of this PR, the AspNetCore.Identity Regex will be used exclusively.

This PR fixes #156

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to modify allowed characters in username.
1 participant