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

Updated username validation rules #272

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

Conversation

felixoi
Copy link
Member

@felixoi felixoi commented Dec 29, 2018

I discussed username validation a bit with Snowie after we got a user with a dot in the name which introduced some trouble.

New username rules would be:

  • The username can contain the following characters: a-zA-z0-9-_
  • The username cannot start or end with -
  • The username cannot contain two special characters in a row (e.g. __test__)

Allowed examples:

  • _test_
  • bettertest_
  • this-is-a-test
  • iamprettynormal
  • I_am_special

Not allowed anymore:

  • I.am.a.test

Before we also allowed usernames to contain . which will be disabled with this PR.
However this PR now allows usernames to end with _. This is maybe controversial but since ewoutvs_ has this in his name as staff member, we should allow it.

@felixoi felixoi force-pushed the fix/username-regex branch 2 times, most recently from b9a8fbc to c61cbd0 Compare December 29, 2018 12:45
@coveralls
Copy link

coveralls commented Dec 29, 2018

Coverage Status

Coverage decreased (-0.01%) to 96.453% when pulling 5dd0ba1 on fix/username-regex into 0875cf8 on master.

Copy link
Member

@gabizou gabizou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While the worry of letting people potentially confuse users with names like _gabizou or _gabizou_, I feel that staff as a whole could moderate those users since the user who tries to register with that name would more than likely be doing so facetiously.

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.

None yet

4 participants