Skip to content

Add feedback blocklist to prevent toxic messages and spam of profanity-#5737

Open
manuJL wants to merge 6 commits into
fmhy:mainfrom
manuJL:feedback-blocklist
Open

Add feedback blocklist to prevent toxic messages and spam of profanity-#5737
manuJL wants to merge 6 commits into
fmhy:mainfrom
manuJL:feedback-blocklist

Conversation

@manuJL

@manuJL manuJL commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

feedback-blocklist.txt its simple text file that has list of vulgar and toxic and profanity words that is used by feedback.post.ts to detect those words and blocked them and feedback with those words don't get sent instead it get discarded and regex patterns and keeps the original rate limiting and Discord webhook logic

@manuJL manuJL requested a review from taskylizard as a code owner July 7, 2026 19:52
@github-actions github-actions Bot added the core Core changes to our VitePress setup label Jul 7, 2026

@manuJL manuJL left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added small change

@litekin

litekin commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

I'd suggest using https://www.profanity.dev/ or importing everything in https://github.com/dsojevic/profanity-list, rather than manually choosing which words to block

… blocked wordws , Regex layer improved to catch better and better normalisation
@bbbreaddd

Copy link
Copy Markdown
Contributor

I have a few problems.

  1. You changed the copyright header for some reason. You weren't the original author of the file so I don't think it's right to do that.
  2. With the way it is right now, it seems likely for false positives to happen. I think it should be more specific to ensure that only likely toxic messages are blocked. It shouldn't be too broad.
  3. You say that blocked messages are indistinguishable from a regular message, but it isn't. For some reason, you add to the message if it's blocked. Technically most people wouldn't know the difference, but still, the difference is there and I'm not sure why it would be there.
  4. Since it's open source, it probably wouldn't be that hard for someone to just look at the code to see how to workaround the filter, but again, most people probably wouldn't know how to do that or know about the filter.
  5. I'm not really liking the idea of blocking messages (mostly because of false positives). I don't really care when I see toxic messages, it's easy for me to ignore them and delete them. Not sure if other people feel the same way.

I'll see if I can test it later on to find out if it actually works.

@litekin

litekin commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

yeah this would just be something to reduce trashy spam. better than nothing.
currently it seems you just had grok generate a list of profanities based on https://github.com/dsojevic/profanity-list... rather than importing the list. use the npm package instead. then the JSON properties can be used to minimize false positives, by setting allow_partial to false and the severity level to 3 or 4.

aksh_intern added 3 commits July 8, 2026 09:16
1. Restored Copyright: The header in feedback.post.ts has been reverted to the original Copyright (c) 2025 taskylizard.
2. Reverted Blocklist: Completely reverted api/feedback-blocklist.txt since we are no longer using it.
3. NPM Package Integration: Uninstalled the generated list and installed the official @dsojevic/profanity-list package. The backend now loads its en.json dataset directly.
4. Mild vs. Heavy Profanity:
   - Severity 1 & 2 (e.g. "fuck"): Words are replaced with **** and the message is sent to Discord.
   - Severity 3 & 4 (e.g. slurs): The message is blocked. The API returns a 400 error, triggering the frontend error.
5. No More Broad Patterns: Removed broad normalization and leet-speak regexes. The system now uses exact word boundaries (\b).
6. Frontend Cleanup: Removed the client-side hasProfanity gate and the fake network delay.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core changes to our VitePress setup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants