-
Security
Secure my file upload handling
Validates file types by content not extension, caps sizes, renames uploads, and keeps them outside the web root.
Free Prompt
What This Does / How This Helps
Hardens every upload endpoint so users can't push executable files, oversized payloads, or files lying about their type into your app. Uploads are a direct path to server compromise when they trust the file extension. A renamed script uploaded as a profile photo, stored in the web root, and served back can execute on your server or attack other users. Content-based validation, size caps, random filenames, and storage outside the web root close that path. You'll see what each endpoint accepted before and after, plus attack-style verification steps like uploading a disguised executable and watching it fail.
Want to skip doing this by hand?
Fortivibe audits your app for all of the areas these prompts cover (and more).