raymondjavaxx / swearjar-node

Profanity detection and filtering library.
MIT License
73 stars 33 forks source link

Can be Bypassed by Attaching a Single Character in Front #9

Open zedseven opened 7 years ago

zedseven commented 7 years ago

The filter can be bypassed by putting the negative word amongst other characters:

console.log(swearjar.censor('<f-bomb>')); //**** - handled correctly console.log(swearjar.censor('sdas<f-bomb>jkjf')); //sdas<f-bomb>jkjf - the word is muddled, but it got through console.log(swearjar.censor('h<f-bomb>')); //h<f-bomb> - the word got through, and is fairly obviously there