Block a user
fix #84: security headers were silently dropped (set pre-handler)
[pentest2] Unbounded title/language fields accepted and stored (50 KB title, arbitrary language strings)
Fixed in PR #91: title truncated to 200 chars, language validated against ^[a-zA-Z0-9+#-]{1,40}$ with a clear 400 otherwise. Regression tests included.
Bound title and language at create time (#86)
Rate-limit all password verification attempts (#81)
ratelimit: rightmost untrusted-hop-safe client IP (fixes #85)
Fix #83: create API ignores boolean public field
[pentest2] Password-protected pastes: unauthenticated password guessing via GET query params bypasses rate limiting
Confirmed live on v0.2.1 dev: 8 consecutive wrong passwords via GET ?password= all returned 401 with zero 429s, then the correct password succeeded. The POST form path rate limits but the API…
[pentest2] Missing security headers on HTML pages (no CSP, no X-Frame-Options, no X-Content-Type-Options, no Referrer-Policy)
Root-caused: the middleware set headers AFTER the handler ran. Page handlers flush template output immediately, so header mutations after WriteHeader are silently discarded (the unit test passed…
[pentest2] burn_after_reads is never enforced: paste content remains readable indefinitely
[pentest2] burn_after_reads is never enforced: paste content remains readable indefinitely
Not a bug as reported. burn_after_reads (plural) is the budget for burn-after-N and only takes effect when burn_after_read: true is also set (store.CreatePaste: `if p.BurnAfterRead { ...…