From 9ad4ce119a7e25cf9f414919d3d93810979da899 Mon Sep 17 00:00:00 2001 From: sahillllllllll-bit Date: Sat, 28 Feb 2026 08:28:38 +0000 Subject: [PATCH] fix(accounts): enforce blocked usernames containing special characters --- .../app/lib/server/functions/checkUsernameAvailability.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {