diff --git a/apps/meteor/app/lib/server/functions/checkUsernameAvailability.ts b/apps/meteor/app/lib/server/functions/checkUsernameAvailability.ts index 498828444e4b2..1687521b81ff8 100644 --- a/apps/meteor/app/lib/server/functions/checkUsernameAvailability.ts +++ b/apps/meteor/app/lib/server/functions/checkUsernameAvailability.ts @@ -16,7 +16,7 @@ settings.watch('Accounts_BlockedUsernameList', (value: string) => { }); const usernameIsBlocked = (username: string, usernameBlackList: RegExp[]): boolean | number => - usernameBlackList.length && usernameBlackList.some((restrictedUsername) => restrictedUsername.test(escapeRegExp(username).trim())); + usernameBlackList.length && usernameBlackList.some((restrictedUsername) => restrictedUsername.test(username.trim())); export const checkUsernameAvailabilityWithValidation = async function (userId: string, username: string): Promise { if (!username) {