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

Fails on start with empty protections.wordlist.words list #81

Open
MurzNN opened this issue Jan 23, 2021 · 1 comment
Open

Fails on start with empty protections.wordlist.words list #81

MurzNN opened this issue Jan 23, 2021 · 1 comment

Comments

@MurzNN
Copy link

MurzNN commented Jan 23, 2021

Describe the bug
When the protections.wordlist.words list is empty in YAML config file, mjolnir failts to start with this error:

mjolnir/lib/protections/WordList.js:35
         this.badWords = new RegExp("(" + config_1.default.protections.wordlist.words.join(")|(") + ")", "i");
TypeError: Cannot read property 'join' of null

To Reproduce
Steps to reproduce the behavior:

  1. Comment-out all lines from protections.wordlist.words values in example config.
  2. Try to start mjolnir

Expected behavior
Empty list should be treated as empty, without fatal errors.

@hanseartic
Copy link

as a quick-fix you can assign an empt array:
protections.wordlist.words: []

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants