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

[ISS-1111] Add reserved words check to profile registration #1239

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

em-wilson
Copy link

Resolves Issue-1111: Reserved words - In order to keep nice urls (alonetone.com/sudara) we'd need to create a deny list of reserved words, including anything that might be in routes.rb.

Proposed Changes

  1. Adds a helper to check if a username is valid
  • Names must not be in use by an account (it's ok if you're already the person using the name)
  • Names must not be in use by an account request
  • Names must not be part of a DENY list
  • Names must not be part of a route, or partial route, provided by the rails application
image
  1. Performs a username check every time someone has an opportunity to change their user name
  • When signing up
  • When editing their profile
  • No difference in user message between valid & taken names is on purpose; I like obfuscating the reason to discourage path stuffing attacks
image
  1. Adds a CRUD screen to add to the deny word list
  • Words allow REGEX; it's possible to differentiate between "tomshitfactory" and "expletiveshit" for example
image

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.

Reserved Words
1 participant