kang 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
2026-05-29 16:54:40 +08:00
2026-05-27 17:18:45 +08:00
2026-05-28 15:43:54 +08:00
2026-05-29 16:54:40 +08:00
2026-05-12 15:37:36 +08:00
2026-05-26 08:38:40 +08:00
2026-05-12 15:42:02 +08:00
Description
No description provided
152 MiB
Languages
TypeScript 48.6%
Python 22.7%
Vue 11.5%
JavaScript 9.1%
HTML 4.3%
Other 3.8%