Skip to content

fix : add max length guard on fileName field in ValidateNotesSummary #1761

Description

@tmdeveloper007

Summary of What Needs to be Done

The summarizeRequestSchema in ValidateNotesSummary.js defines a fileName field as z.string().max(200) but the saveNotesSummarySchema does not apply the same length constraint to its fileName field. This inconsistency allows oversized filenames through the save path.

Changes that Need to be Made

In backend/Input_validators/ValidateNotesSummary.js, update the saveNotesSummarySchema to add the same max length:

fileName: z.string().min(1).max(200, "File name cannot exceed 200 characters"),

Impact that it would Provide

  • Consistent file name length limits across both summarize and save routes
  • Prevents very long filenames from being stored and displayed in the UI
  • Aligns the saveNotesSummarySchema with the summarizeRequestSchema pattern already in the file

Note

Please assign this issue to the tmdeveloper007 account.

Metadata

Metadata

Labels

claimedThis issue has been claimed by a contributor

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions