From 9218d038ae29e7cc952635382f23ed3df2730e29 Mon Sep 17 00:00:00 2001 From: ShivaniKhaire Date: Thu, 8 Oct 2026 16:44:57 +0530 Subject: [PATCH] fix(auth): disallow emojis in password --- src/App.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index 7c5f4f5..5192984 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -331,11 +331,17 @@ export default function App() { setAuthLoading(false); return; } - if (!/[^A-Za-z0-9\s]/.test(authPassword)) { + if (/\p{Extended_Pictographic}/u.test(authPassword)) { + setAuthError('Password must not contain emojis.'); + setAuthLoading(false); + return; + } + if (!/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?`~]/.test(authPassword)) { setAuthError('Password must contain at least one special character.'); setAuthLoading(false); return; } + } const fullPhone = authPhone ? `${authDialCode}${authPhone}` : undefined; -- 2.34.1