Merge commit from fork

This commit is contained in:
Meier Lukas
2025-12-08 16:54:15 +01:00
committed by GitHub
parent d88c6027fe
commit 1bb3654bf7
3 changed files with 23 additions and 5 deletions

View File

@@ -69,6 +69,17 @@ export const userSignInSchema = z.object({
password: z.string().min(1),
});
export const ldapSignInSchema = z.object({
name: z
.string()
.min(1)
// Prevent special characters that could lead to LDAP injection attacks
.regex(/^[^\\,+<>;"=)(*|!&]+$/, {
message: "Invalid characters in ldap username",
}),
password: z.string().min(1),
});
export const userRegistrationSchema = addConfirmPasswordRefinement(
z.object({
username: usernameSchema,