project-nomad/admin/app/validators/rag.ts
Claude 6058fd31a0
fix: add input validation constraints for service names, file paths, uploads, and settings keys
- system.ts: Add maxLength(100) and alphanumeric/hyphen/underscore regex to service_name fields
- system.ts: Add maxLength(50) and semver/Docker tag regex to target_version field
- rag.ts: Add maxLength(500) to filePath field
- rag_controller.ts: Add 50MB file upload size limit and validation error handling
- settings_controller.ts: Validate getSetting() key parameter against KV_STORE_SCHEMA at runtime

https://claude.ai/code/session_01JFvpTYgm8GiE4vJ4cJKsFx
2026-03-24 09:30:03 +00:00

14 lines
245 B
TypeScript

import vine from '@vinejs/vine'
export const getJobStatusSchema = vine.compile(
vine.object({
filePath: vine.string().maxLength(500),
})
)
export const deleteFileSchema = vine.compile(
vine.object({
source: vine.string(),
})
)