Enforce admin CSRF, harden catalog translate, use CMS hotel name for PayPal.

Mutating withAdmin routes now require a double-submit CSRF token; translate is capped at 500 items with audit logging; PayPal descriptions prefer siteSettings hotel_name.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
SimoandCursor committed 2026-07-18 19:38:42 +02:00
1 parent 6b884ad25a
commit 2de3696993
18 files changed
+218 -62

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
import { z } from "zod";
export const translateItemsSchema = z.object({
items: z
.array(
z.object({
id: z.coerce.number().int().positive(),
publicName: z.string().min(1, "Name is required").max(255),
description: z.string().max(1000).optional().default(""),
}),
)
.min(1, "At least one item required")
.max(500),
});
export type TranslateItemsInput = z.infer<typeof translateItemsSchema>;