From b1fa980f560d7b58c65f390fd9a82f5ab0ac8fe2 Mon Sep 17 00:00:00 2001 From: Milo Schwartz Date: Sat, 8 Feb 2025 16:04:41 -0500 Subject: [PATCH] expand list of allowed special characters in password --- server/auth/passwordSchema.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/auth/passwordSchema.ts b/server/auth/passwordSchema.ts index 5554b741..9c399092 100644 --- a/server/auth/passwordSchema.ts +++ b/server/auth/passwordSchema.ts @@ -3,8 +3,8 @@ import z from "zod"; export const passwordSchema = z .string() .min(8, { message: "Password must be at least 8 characters long" }) - .max(64, { message: "Password must be at most 64 characters long" }) - .regex(/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[,#?!@$%^&*-]).*$/, { + .max(128, { message: "Password must be at most 128 characters long" }) + .regex(/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[~!`@#$%^&*()_\-+={}[\]|\\:;"'<>,.\/?]).*$/, { message: `Your password must meet the following conditions: at least one uppercase English letter, at least one lowercase English letter,