Pastebin limits: 5 MB per paste, 10 per IP and 1000 site-wide per 24 h

Creations are logged in SQLite (IP as an HMAC with a per-install key, kept
24 h), so limits survive restarts and deleting a paste doesn't refund it.
The site-wide cap also bounds storage (~5 GB worst case), replacing the
live-storage cap. Adds an Open file button to the paste page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
neil 2026-11-01 23:51:19 -08:00
parent 792d48553c
commit f4232ef9b5
3 changed files with 50 additions and 36 deletions

View file

@ -55,7 +55,9 @@ on the same host in front of it.
## Pastebin limits
1 MiB per paste, 256 MiB of live pastes in total, 30 new pastes per IP per hour. Expired
5 MB per paste, 10 new pastes per IP and 1000 for the whole site per rolling 24 hours
(logged in the DB with the IP as a keyed hash, so limits survive restarts and deleting a paste
doesn't refund it). Expired
pastes stop being served immediately and are deleted every 5 minutes. `/raw/<id>` is served
as `text/plain` with a sandboxing CSP, so a paste can never run as a page on this origin.
Each paste gets a delete token, kept in the creating browser's localStorage.