chore: CSRF protect cancel functionality (#23439)
* add csrf endpoint * Update booking-pages.e2e.ts * Update zod-utils.ts * fix type error
This commit is contained in:
1 parent
2e9aa01771
commit
f6f36750ec
5 files changed
+40
-2
No files matched your search
@@ -309,6 +309,12 @@ export const bookingCancelInput = bookingCancelSchema.refine(
|
||||
"At least one of the following required: 'id', 'uid'."
|
||||
);
|
||||
|
||||
export const bookingCancelWithCsrfSchema = bookingCancelSchema
|
||||
.extend({
|
||||
csrfToken: z.string().length(64, "Invalid CSRF token"),
|
||||
})
|
||||
.refine((data) => !!data.id || !!data.uid, "At least one of the following required: 'id', 'uid'.");
|
||||
|
||||
export const vitalSettingsUpdateSchema = z.object({
|
||||
connected: z.boolean().optional(),
|
||||
selectedParam: z.string().optional(),
|
||||
|
||||
Reference in new issue
Block a user