Clip video static mount serves the whole output_dir without authentication #113
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
create_app mounts StaticFiles(directory=output_dir) at /clips/video without the require_auth dependency (Starlette mounts do not inherit router dependencies). With auth enabled, GET /clips/video/cang.db returns the SQLite database, and every file under output_dir is fetchable unauthenticated. Once snapshots move into output_dir (#112) this exposure grows to all snapshots. Clip videos need to be served through an authenticated route instead of a blanket static mount.
Plan: remove the StaticFiles mount from create_app and add GET /clips/{clip_id}/video on the clips router (which already carries the require_auth dependency). Path is built server-side from the clip row via the new storage helpers — no client-supplied paths. day.html switches to the new URL. Needs a test that Range requests still get 206 for the