navidrome/server/public
Deluan Quintão 969e7e108c
fix(share): enforce track membership on public share streams (#5769)
* 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
2026-07-13 09:04:24 -04:00
..
handle_downloads.go Replace all utils.Param* with req.Params 2023-12-21 17:41:09 -05:00
handle_images.go fix(server): use http.TimeFormat for Last-Modified header (#5219) 2026-03-17 08:04:47 -04:00
handle_images_test.go refactor(auth): replace untyped JWT claims with typed Claims struct 2026-03-02 14:03:27 -05:00
handle_shares.go fix(share): enforce track membership on public share streams (#5769) 2026-07-13 09:04:24 -04:00
handle_streams.go fix(share): enforce track membership on public share streams (#5769) 2026-07-13 09:04:24 -04:00
handle_streams_test.go fix(share): enforce track membership on public share streams (#5769) 2026-07-13 09:04:24 -04:00
public.go fix(server): prevent artwork throttle token starvation on slow clients (#5472) 2026-05-06 00:12:50 -04:00
public_suite_test.go Move artwork id encoding to public package 2023-01-16 15:24:25 -05:00