Skip to content

Jellyfin compat layer ignores account-level library restrictions (users.library_ids) #71

Closed

Description

@d3v1l1989

The native API enforces account-level library restrictions (users.library_ids) via access.Resolver, but the Jellyfin compat layer never loads them. The compat AccessFilterFn wired up in cmd/silo/main.go is a partial re-implementation of the access policy that only reads profile-level restrictions and the viewer's own disabled_library_ids setting — the admin-assigned per-account library allowlist is silently dropped.

Result: any Jellyfin client (Infuse, Findroid, VidHub, jellyfin-web, …) logged in as a restricted user can list, browse, search, and play items from every enabled library, including libraries the admin explicitly withheld from that account. The native UI and the compat API disagree about the same viewer.

Checked against e9cf274 (current main).

Repro

  1. Create a user with library_ids set to a subset of libraries (admin → user settings, or POST /api/v1/admin/users with "library_ids": [...]).
  2. Log that user into any Jellyfin client against the compat port (8096).
  3. GET /Users/{id}/Views — every enabled library is returned, including the withheld ones; their items browse and play normally.

The same user in the native web UI correctly sees only the allowed libraries.

Related gaps in the same code path

  • A profile restricted to zero libraries is treated as unrestricted (len > 0 check).
  • MaxPlaybackQuality ceilings (account and profile) are never propagated to the compat filter, so quality-capped users get every file version on compat clients.
  • Errors during policy resolution (user store unavailable, profile deleted mid-session) fail open — the viewer gets an unrestricted filter.
  • ListUserLibraries never applies DisabledLibraryIDs, so an unrestricted user's hidden libraries still show up as compat views.

PR with a fix incoming (delegates the compat filter to the shared access.Resolver).

Diagnosis was AI-assisted (Claude); the bypass was reproduced live on my server before filing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions