clipwright/cloud
juancarlos.cavero 6ec6935532 fix(cloud): harden paid-mode surface + source-available license for cloud/
Security fixes on the hosted/paid surface (all no-op in self-host / BYOK):
- upload path traversal: basename() client filenames in /api/process,
  /api/thumbnail/upload, /api/thumbnail/analyze fallback, /api/thumbnail/generate
  (face/bg + session_id) so "../" can't escape UPLOAD_DIR
- SSRF: saasshorts subpage scraper now follow_redirects=False + assert_public_url
  per hop (was open to 302 -> 169.254.169.254 metadata)
- metering: reserve+commit/release on /api/render, /api/subtitle, /api/hook and a
  fixed guard cost on /api/thumbnail/upload transcription (were entitlement-gated
  but unmetered -> unlimited off-quota compute)
- entitlement: SaaSShorts generate/actor-options/actor-upload now require a plan
  in cloud; /api/edit ignores body api_key in cloud (no gate/meter bypass)
- multi-tenant IDOR: stamp user_id on thumbnail_sessions/saas_jobs and reject
  non-owners (404) across status/mutation/publish/post endpoints
- DoS: bounded/streamed reads on actor-upload and thumbnail uploads
- retry_job_id routed through _safe_under

Frontend: raw fetch -> apiFetch on the now-gated/owner-checked endpoints so the
bearer token attaches.

License: cloud/ is now source-available under the OpenShorts Commercial License
(self-host/personal use allowed; no competing hosted service). Core stays MIT.
2026-07-16 17:30:12 +02:00
..
__init__.py feat: durable video library on Cloudflare R2 (history + retention) 2026-07-14 14:56:40 +02:00
alerts.py feat: 720p->360p download fallback + SMTP email alerts 2026-07-14 14:00:02 +02:00
auth.py feat: add hosted paid mode (managed keys, Stripe trial, metering) 2026-07-14 13:04:43 +02:00
billing.py feat(billing): 20-min trial cap + activate-plan-now upgrade flow 2026-07-16 02:13:55 +02:00
config.py fix(cloud): harden paid-mode surface + source-available license for cloud/ 2026-07-16 17:30:12 +02:00
database.py feat: add hosted paid mode (managed keys, Stripe trial, metering) 2026-07-14 13:04:43 +02:00
emails.py feat: 720p->360p download fallback + SMTP email alerts 2026-07-14 14:00:02 +02:00
LICENSE fix(cloud): harden paid-mode surface + source-available license for cloud/ 2026-07-16 17:30:12 +02:00
managed_keys.py feat: add hosted paid mode (managed keys, Stripe trial, metering) 2026-07-14 13:04:43 +02:00
metering.py feat(billing): 20-min trial cap + activate-plan-now upgrade flow 2026-07-16 02:13:55 +02:00
models.py feat: durable video library on Cloudflare R2 (history + retention) 2026-07-14 14:56:40 +02:00
oauth.py feat: add hosted paid mode (managed keys, Stripe trial, metering) 2026-07-14 13:04:43 +02:00
social_profiles.py feat: add hosted paid mode (managed keys, Stripe trial, metering) 2026-07-14 13:04:43 +02:00
storage.py feat: durable video library on Cloudflare R2 (history + retention) 2026-07-14 14:56:40 +02:00
videos.py feat: durable video library on Cloudflare R2 (history + retention) 2026-07-14 14:56:40 +02:00