Commit Graph

2 Commits

Author SHA1 Message Date
Antigravity 3c15f1e2c7 feat: burn-after-read (self-destruct) paste option
- Add 🔥 Burn checkbox on the create page (next to Discuss)
- New DB columns: burn_after_read (INTEGER) and burn_token (TEXT) with
  automatic migration for existing databases
- POST /api/burn/<paste_id> endpoint: validates a one-time burn_token
  (constant-time comparison), deletes paste + comments atomically
- burn_token embedded as a JSON island in view.html so paste_view.js
  can read it without Jinja in external scripts
- After successful decryption, scheduleBurn() fires 1.5 s later so
  the user has time to read/copy before the paste is destroyed
- showBurnBanner() inserts a warm amber warning strip (slides in with
  animation) informing the viewer the paste will self-destruct
- Burn is intentionally NOT persisted to localStorage — it's a
  deliberate per-paste choice, not a sticky preference
- Server responds 200 even if paste is already gone (idempotent)
2026-05-16 12:31:47 +01:00
ComputerTech 14be14e437 Initial commit — Bastebin 2026-03-26 14:44:36 +00:00