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.
Summary of What Needs to be Done
The
summarizeRequestSchemainValidateNotesSummary.jsdefines afileNamefield asz.string().max(200)but thesaveNotesSummarySchemadoes not apply the same length constraint to itsfileNamefield. This inconsistency allows oversized filenames through the save path.Changes that Need to be Made
In
backend/Input_validators/ValidateNotesSummary.js, update thesaveNotesSummarySchemato add the same max length:Impact that it would Provide
saveNotesSummarySchemawith thesummarizeRequestSchemapattern already in the fileNote
Please assign this issue to the
tmdeveloper007account.