mirror of
https://github.com/navidrome/navidrome.git
synced 2026-08-04 22:00:20 +00:00
* fix(share): enforce track membership on public share streams
The public share stream endpoint (GET /share/s/{jwt}) validated that the
share existed, was unexpired, and that the share owner had library access
to the requested track, but it never verified that the track was actually
a member of the share. It also accepted stream tokens with no share id
(sid) claim, skipping share checks entirely.
Enforce that the requested media file belongs to share.Tracks, and make
the sid claim mandatory on the stream path. The only producer of stream
tokens (encodeMediafileShare) always sets sid, so no legitimate flow is
affected; the image endpoint decodes independently and is unchanged.
Also document why a JWT is used to represent a shared track: it is a
signed, scoped capability for a single public share, not part of
authentication.
* docs(share): clarify JWT usage comment wording
|
||
|---|---|---|
| .. | ||
| handle_downloads.go | ||
| handle_images.go | ||
| handle_images_test.go | ||
| handle_shares.go | ||
| handle_streams.go | ||
| handle_streams_test.go | ||
| public.go | ||
| public_suite_test.go | ||