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

Implement bad words filter #3

Open
pg9182 opened this issue Oct 22, 2022 · 1 comment
Open

Implement bad words filter #3

pg9182 opened this issue Oct 22, 2022 · 1 comment
Labels
feature New feature or request good first issue Good for newcomers

Comments

@pg9182
Copy link
Member

pg9182 commented Oct 22, 2022

Required for feature parity with the old server, also supersedes R2Northstar/NorthstarMasterServer#66.

@pg9182 pg9182 added feature New feature or request good first issue Good for newcomers labels Oct 22, 2022
@pg9182
Copy link
Member Author

pg9182 commented Oct 22, 2022

If someone wants to work on this:

  • First commit:
    • Create a new package pkg/badwords which contains badwords.go with a type List struct and at least the functions func ReadList(r io.Reader) (*List, error), func (l *List) AddWord(word string) (but don't need this if you're doing an optimized implementation which needs stuff to be precomputed) and func (l *List) Filter(s string) string.
    • It's up to you how to do the filtering, and while it should be efficient, it doesn't have to be optimal since we don't do it too often.
    • Adding a word doesn't need to be safe for concurrent use.
    • Create unit tests in badwords_test.go.
  • Second commit:
    • Add a config option in pkg/atlas, BadWordList string `env:"ATLAS_BADWORDS_LIST"`.
    • Read the word list from the provided filename and set the BadWords field of api0.Handler when creating a new *Server.

@ASpoonPlaysGames ASpoonPlaysGames moved this to Candidates for next Patch release in Northstar Roadmap Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request good first issue Good for newcomers
Projects
Status: No status
Development

No branches or pull requests

1 participant