Commit Graph

7 Commits

Author SHA1 Message Date
3ed3f721eb fix(api): harden subprocess/SSRF/concurrency and add db pool
- run(): add timeout (download 600s via DOWNLOAD_TIMEOUT_SECONDS, else 300s);
  TimeoutExpired now kills the child and fails the job instead of hanging forever
- create_job: validate_source_url() rejects file://, private/loopback/link-local
  IPs and off-allowlist hosts (SOURCE_URL_ALLOWED_HOSTS) — closes SSRF/local-read
- per-job RLock guards save_state/update/update_generated_video and the retry
  check-and-set so concurrent video workers can't clobber state.json
- db: psycopg_pool connection pool (graceful fallback if unavailable); write
  failures surfaced via logging.error instead of silent print
- read-only media GET routes use job_path() (no mkdir) to stop empty-dir spam
- wrap remaining Image.open() in with-blocks to avoid fd leaks

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 02:04:59 +08:00
089a30d970 auto-save 2026-05-26 00:07 (+1, ~3) 2026-05-26 00:07:48 +08:00
ff7bf00f6d fix: force azure asr mode 2026-05-19 10:31:31 +08:00
5b44d35316 fix: add cloud local asr fallback 2026-05-19 10:06:41 +08:00
6a9abeabc0 auto-save 2026-05-12 17:28 (~6) 2026-05-12 17:28:54 +08:00
35b327815a auto-save 2026-05-12 16:16 (~4) 2026-05-12 16:16:52 +08:00
2e45ad9d16 auto-save 2026-05-12 15:47 (+2, ~3) 2026-05-12 15:51:42 +08:00