Skip to content

Commit

Permalink
[FIX] Not being able to mention users with "all" and "here" usernames…
Browse files Browse the repository at this point in the history
… - do not allow users register that usernames (#14468)
  • Loading branch information
hamidrezabstn authored and sampaiodiego committed Jul 15, 2019
1 parent 9c2d4ae commit 2e69929
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/lib/server/functions/checkUsernameAvailability.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let usernameBlackList = [];
const toRegExp = (username) => new RegExp(`^${ s.escapeRegExp(username).trim() }$`, 'i');

settings.get('Accounts_BlockedUsernameList', (key, value) => {
usernameBlackList = value.split(',').map(toRegExp);
usernameBlackList = ['all', 'here'].concat(value.split(',')).map(toRegExp);
});

const usernameIsBlocked = (username, usernameBlackList) => usernameBlackList.length
Expand Down

0 comments on commit 2e69929

Please sign in to comment.