habitica/website/server
Carlton McFarlane a53355872b
Add checks for profanity to profile updates (#12445)
* fix(profile): detect attempt to use banned words as display name. refactor profanity detection method.

* fix(profile): detect attempt to use banned words in blurb. further refactor profanity detection. inform the user their chat privileges have been revoked.

* refactor: add function to normalize Unicode strings and remove diacritics

* fix: improve regEx to prevent false partial matches e.g. 'hello' being recognised as banned words. porting fix from #12309

* fix(profile): refactor of profanity detection for #12445

* fix(profile): add test for swear words in new profile. fix existing tests

* fix(profile): show different error message for attempted slur use in username by new users.

* fix(profile): remove incorrect slur test

* fix(profile): fix slurs not caught at start of end of strings connect by punctuation

* tests(profile): fix tests for profanity checking

* remove exclusive test

* 11865 - update text for slur warnings

* 11865 - remove unused string from locale files

* 11865 - improve naming of banned word usage locale string

* 11865 - improve logic so that differentiated warnings are shown depending on whether a slur or other profanity has been used in a display name

* 11865 - construct slur regexes outside the validation function in which they are used

* 11865 - fix tests
2021-04-30 15:47:39 -05:00
..
controllers Add checks for profanity to profile updates (#12445) 2021-04-30 15:47:39 -05:00
libs Add checks for profanity to profile updates (#12445) 2021-04-30 15:47:39 -05:00
middlewares Stripe: upgrade module and API, switch to Checkout (#12785) 2020-12-14 15:59:17 +01:00
models Correct a typo in website/server/models/challenge.js (#13146) 2021-04-02 16:00:52 +10:00
.eslintrc.js misc, fix client tests 2019-10-15 15:32:53 +02:00
api-doc.js chore: update sub-deps and fix lint 2020-07-01 18:20:18 +02:00
index.js fix(logger): improve logging and make sure no data is lost 2020-03-24 20:29:31 +01:00
server.js start upgrading eslint 2019-10-08 16:57:10 +02:00