[loggi-983] Add server-side validation for record text length #125
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bead ID:
loggi-983Type: task
Priority: P3
Status: closed
Close reason: Added MAX_RECORD_TEXT = 50,000 char limit. Validated in both POST /api/entries//records and PATCH /api/records/ endpoints. Added 7 tests covering: too-long rejected, at-limit accepted, null text OK (both create and edit).
EntryRecord.text is a Text column (unlimited), but there's no server-side cap on text length in record creation/edit endpoints. A malicious client could submit megabytes of text in a single record.\n\nSuggested fix: add a reasonable max length check (e.g. 50,000 chars) in the POST/PATCH record endpoints in routes.py. This matches the pattern of the entry field validation added for name/color/icon.
Dependencies:
loggi-2ze