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

Filter profanity/etc from public user names/urls #574

Closed
malini opened this issue Jul 22, 2024 · 5 comments · Fixed by #658
Closed

Filter profanity/etc from public user names/urls #574

malini opened this issue Jul 22, 2024 · 5 comments · Fixed by #658
Assignees

Comments

@malini
Copy link
Contributor

malini commented Jul 22, 2024

Is your feature request related to a problem? Please describe.
We do not filter user's shortUrls and we should check them against a list of known profanity/etc, so we do not allow harmful language.

Describe the solution you'd like
Determine if Mozilla maintains a profanity filter somewhere we can leverage, or find a suitable alternative (maybe https://github.com/coffee-and-fun/google-profanity-words ?

When users select their username/shortUrls/etc, we should run their input through the filter before accepting it.

@malini malini added enhancement New feature or request M: Appointment Beta 2 labels Jul 22, 2024
@malini
Copy link
Contributor Author

malini commented Jul 22, 2024

i put it as beta v2 because it would be best to have this before we have non-mozillian users

@devmount
Copy link
Collaborator

devmount commented Aug 30, 2024

I analyzed the code base and found the following place where a profanity filter might make sense:

  • /dashboard: schedule name
  • /settings/account: username, display name
  • /setup (FTUE): full name, username, schedule name

@malini Are those places enough for beta for now? Is a frontend filter sufficient for now?

@malini
Copy link
Contributor Author

malini commented Sep 3, 2024

@devmount yup, thanks. And I didn't think of schedule name, so thank you! that's a great suggestion.

@devmount
Copy link
Collaborator

Ok this was more pain than expected 😅 How hard can it be to create a working lib that provides filtering against a fixed set of words 🙈

So I went with the 2nd one for now, since it was the only one that worked anyway. If we find another more suitable lib that contains other languages as well, we can easily switch.

image
image
image
profanity1
profanity2

@devmount
Copy link
Collaborator

Good news: The maintainer of https://github.com/2Toad/Profanity is quite active and directly responded to my feature request for multiple languages. So we might just keep that for now.

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

Successfully merging a pull request may close this issue.

2 participants