Browse Source

Fix: Improve special character regex (#1744)

* update password special character regex to support
( `-` `_` `=` `+` `[` `]` `;` `'` `\` `/` )
pull/1745/head
Pokydko Oleksandr 3 weeks ago
committed by GitHub
parent
commit
a6e3369475
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      src/server/database/repositories/user/types.ts

2
src/server/database/repositories/user/types.ts

@ -15,7 +15,7 @@ const password = z
.regex(/[A-Z]/, t('zod.user.passwordUppercase'))
.regex(/[a-z]/, t('zod.user.passwordLowercase'))
.regex(/\d/, t('zod.user.passwordNumber'))
.regex(/[!@#$%^&*(),.?":{}|<>]/, t('zod.user.passwordSpecial'))
.regex(/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/? ]/, t('zod.user.passwordSpecial'))
.pipe(safeStringRefine);
const remember = z.boolean({ message: t('zod.user.remember') });

Loading…
Cancel
Save