Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix(auth): only allow alphanumeric characters and spaces in name during sign-up (#10603)

Marc Klingendf7d696db884
diff --git a/web/src/features/auth/lib/signupSchema.ts b/web/src/features/auth/lib/signupSchema.ts
index 64635e1883..8b0b640d85 100644
--- a/web/src/features/auth/lib/signupSchema.ts
+++ b/web/src/features/auth/lib/signupSchema.ts
@@ -20,6 +20,8 @@ export const passwordSchema = z
export const signupSchema = z.object({
name: StringNoHTMLNonEmpty.refine((value) => noUrlCheck(value), {
message: "Input should not contain a URL",
+ }).refine((value) => /^[a-zA-Z0-9\s]+$/.test(value), {
+ message: "Name can only contain letters, numbers, and spaces",
}),
email: z.string().email(),
password: passwordSchema,