Security:
- /cache is no longer public static files: served via an authenticated route
that verifies a valid session AND project ownership (was an IDOR exposing
confidential drawings). Frontend appends the token to <img> cache URLs.
- verify_session_token now reads role FROM THE DB (not the token), so a
demotion/suspension takes effect immediately instead of persisting 8h.
- Cancel the user's Dodo subscriptions on account deletion (was: keep billing
a deleted account).
- Rate limiter keys on the real client IP (cf-connecting-ip / x-forwarded-for)
instead of the proxy IP, which had made it collective/useless behind Render.
- Upload reads are capped at MAX_UPLOAD_BYTES to prevent memory-exhaustion DoS.
- .dockerignore/.gitignore now exclude the local venv and scratch/debug scripts
(several held hardcoded secrets and were being baked into the image).
Reliability:
- DB errors are logged (were silently printed / swallowed as "no rows").
- New transaction() context manager for a…
Add module subscriptions and account deletion cooldown