-
Database
Cap unbounded text fields
Adds length limits to user text fields and columns so no single record can bloat rows, pages, or payloads.
Free Prompt
Find every user-writable text field in my app and give it a sane maximum length. Bios, comments, descriptions, names, messages, support inputs: list them all and what's stored in them now.
For each: set a real maximum based on what the UI can display and the feature needs (a name doesn't need 10,000 characters; a bio doesn't need a novel); enforce the limit at the database column level where the database supports it, at the API validation layer, and in the form itself, with the form limit matching the server limit so users get honest feedback; and report any existing rows over the new limit instead of truncating them silently.
Don't pick one global limit and apply it everywhere; a comment and a display name have different sane ceilings. Don't truncate existing user data without showing me the affected rows first.
Deliver: the limit per field with reasoning, enforcement at all three layers, the over-limit rows report, and verification: submit over-limit text through the form and the API directly, and confirm both reject it.
What This Does / How This Helps
Puts a ceiling on user text so no field can accept a megabyte of garbage into a row your pages read constantly. Unbounded text is a quiet performance and abuse problem: oversized rows slow every query that touches them, giant payloads slow pages, and paste-a-book attacks into your comment field are a real thing people do. Limits are trivial to add and annoying to retrofit. Enforcing at all three layers matters: the form for honest feedback, the API because forms get bypassed, the database because APIs get bypassed.
Want to skip doing this by hand?
Fortivibe audits your app for all of the areas these prompts cover (and more).