Commit graph sonda/internal/streaming/open_other.go
Author SHA1 Message Date
tgiachi
def20731be fix(streaming): open files through os.Root and tighten token parsing
- fix: open the audio file through os.Root with O_NONBLOCK. A FIFO under a
  stored path used to block the request forever in open(2) before the
  regular-file check could run; now it is refused immediately
- fix: os.Root also removes the gap between checking the path and opening it,
  so a symlink swapped in at the last moment cannot leave the library
  (absolute symlinks are refused even when they point back inside)
- fix(api): only "Authorization: Bearer <token>" is accepted again. The query
  token change had made a bare token in the header pass on every route
- fix(config): library.roots must be absolute paths; a relative root made
  every stream fail and depended on the directory sondad started in
- test: FIFO and symlink-to-FIFO without hanging, bare and non-Bearer headers
  on a normal route and on the stream route, relative roots
2026-11-11 13:00:17 +01:00