diff --git a/src/pages/user/SecurityPage.tsx b/src/pages/user/SecurityPage.tsx index 7fbf7c6..d742956 100644 --- a/src/pages/user/SecurityPage.tsx +++ b/src/pages/user/SecurityPage.tsx @@ -55,6 +55,11 @@ export default function SecurityPage() { return; } + if (newPassword === currentPassword) { + setPasswordError("New password must be different from current password"); + return; + } + if (!isPasswordValid(newPassword)) { setPasswordError("New password does not meet strength requirements"); return;