HomePhabricator
Diffusion Comm 9370f91f0482

[keyserver] Handle offensive words in invite links

Description

[keyserver] Handle offensive words in invite links

Summary:
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

Test Plan:
Tried to create a link consisting of just an offensive word and an error was returned.
Tried to create a link with a string consisting of an offensive word with some prefix - a link was created correctly. This isn't ideal, but handing it correctly might be challenging: e.g. invite/class sounds like a proper link, but simply checking if it contains an offensive substring would forbid it.

Reviewers: kamil, inka, ashoat

Reviewed By: ashoat

Differential Revision: https://phab.comm.dev/D8527

Details

Provenance
tomekAuthored on Jul 18 2023, 4:13 AM
Reviewer
ashoat
Differential Revision
D8527: [keyserver] Handle offensive words in invite links
Parents
rCOMM9143e129c164: [keyserver] Extract database error codes
Branches
Unknown
Tags
Unknown