Check if an invite link contains abusive words and return an error if that's the case.
https://linear.app/comm/issue/ENG-4181/handle-offensive-abusive-words
https://www.npmjs.com/package/bad-words
Depends on D8494
Differential D8527
[keyserver] Handle offensive words in invite links tomek on Jul 18 2023, 4:14 AM. Authored by Tags None Referenced Files
Subscribers None
Details Check if an invite link contains abusive words and return an error if that's the case. https://linear.app/comm/issue/ENG-4181/handle-offensive-abusive-words Depends on D8494 Tried to create a link consisting of just an offensive word and an error was returned.
Diff Detail
Event TimelineComment Actions Can you provide some more context on the selection of this package? I noticed it hasn't been updated in 3 years and has some unaddressed GitHub issues, but I'm guessing your research showed that it's the best option. Comment Actions It is the most popular NPM package for profanity checks https://www.npmjs.com/search?q=keywords%3Aprofanity&ranking=popularity. Also, the issues on Github aren't serious. The implementation is so simple that it doesn't need frequent updates. Comment Actions Doe this mean that it is possible to create a community with a name that is a swearword in some language, but then we won't be able to create a link that has the name of that community in it? That seems odd Comment Actions Thanks for explaining! The name will eventually be encrypted, so we (as Comm) should have no way to ban it. On the other hand, the invite link will use our domain name in the future, so I think it makes sense to add some filtering there. Comment Actions Can you clarify what will happen on older clients when this endpoint returns a ServerError that they aren't aware of? EDIT Looks like on older clients it will display offensive_words directly. But D8494 makes it so if a future keyserver returns an unknown error code to a future client, unknown error will be displayed instead. |