unarr/internal
Deivid Soto d97ca11fa5 fix(stream): self-heal host→container path skew in HLS + sidecar handlers
On a docker agent the web DB holds host paths (e.g. /mnt/nas/peliculas/…)
while the container mounts that media at /downloads, so the runtime allowed
root (cfg.Download.Dir=/downloads) rejects the host path. The raw /stream
handler already self-heals via relocateUnreachable, but the HLS/remux session
handler did not — it logged "path outside allowed dirs" and returned, so the
web silently fell back to the raw /stream path (no transcode, slow funnel
start) and HLS/remux never ran. The path-scoped sidecar handlers
(/thumbnail, /trickplay, /sub) had the same skew → 404 for every scrubber
frame, trickplay sprite and external subtitle.

- HLS handler (OnStreamSession): apply the same relocateUnreachable remap as
  the raw handler before the dir-resolve.
- StreamServer: add SetPathResolver/healMediaPath, applied in /thumbnail,
  /trickplay, /sub AFTER token verification (the token still binds the
  original web path; the resolver is a pure function of that path and
  re-validates containment, so it can't be abused to serve a different file).
- Hoist the allowed-roots list into streamAllowedRoots(cfg) so the raw, HLS
  and sidecar handlers can't drift apart.

Note: relocateUnreachable needs a ≥3-segment path tail, so flat media layouts
are not self-healed (same limitation as /stream; a re-scan rewrites the DB
path). The HLS handler replicates only the lexical remap, not the raw
handler's transient-NFS os.Stat retry.
2026-06-04 22:38:12 +02:00
..
agent feat(agent): report isDocker so the web shows a docker pull command 2026-06-03 18:09:29 +02:00
arr feat(cli): upgrade command, rich status, and version cache 2026-03-31 22:05:43 +02:00
cmd fix(stream): self-heal host→container path skew in HLS + sidecar handlers 2026-06-04 22:38:12 +02:00
config fix(trickplay): stop scan-time sprite generation from saturating the host 2026-06-04 08:25:00 +02:00
engine fix(stream): self-heal host→container path skew in HLS + sidecar handlers 2026-06-04 22:38:12 +02:00
funnel fix(agent): surface par2/install/NFS failures instead of degrading silently 2026-06-01 15:52:54 +02:00
library fix(trickplay): stop scan-time sprite generation from saturating the host 2026-06-04 08:25:00 +02:00
mediaserver feat(cli): upgrade command, rich status, and version cache 2026-03-31 22:05:43 +02:00
parser feat: initial commit — unarr CLI 2026-03-28 11:29:42 +01:00
sentry refactor(sentry): decouple agent import via string-match, rename predicate 2026-05-27 17:03:26 +02:00
ui fix(ci): fix lint errors and pin CI to Go 1.25 2026-03-31 22:15:12 +02:00
upgrade test(upgrade): exercise the real signed checksum flow, not a bypass 2026-06-04 08:47:24 +02:00
usenet fix(agent): surface par2/install/NFS failures instead of degrading silently 2026-06-01 15:52:54 +02:00
vpn feat(vpn): unarr vpn command + report/arbitrate the WireGuard slot 2026-05-22 08:33:02 +02:00