Skip to content

Bug Report: Inconsistent access rules and bugs in public vs. private production API endpoints (api vs. apiz) for private profiles of mutual friends #856

Description

@bcansiz74

Describe the Bug

Currently, there are critical inconsistencies and bugs when interacting with private user profiles via the public production API (api.trakt.tv) versus the official/private production API (apiz.trakt.tv).

When User A and User B are mutual friends (meaning they follow each other, and the relationship is verified under User A's /following list and /friends endpoint), but User B's profile is set to Private:

  1. Several endpoints on the private/official API (apiz.trakt.tv) return empty [] arrays or 403 Forbidden responses despite the established friendship.
  2. Conversely, there is a privacy leak on both APIs where some endpoints (like favorites and watchlist) return full datasets even if the requesting user is not following the private profile owner.

Identified Discrepancies

1. Mutual Friend's Data returning empty [] or 403 (Bugs)

Despite the confirmed friendship, several authenticated requests using User A's OAuth token on User B's (userb) private profile fail to return data depending on the target API:

  • Watched History (/history):
    • GET https://api.trakt.tv/users/userb/history (Public API) works correctly and returns history data.
    • GET https://apiz.trakt.tv/users/userb/history (Private/Official API) incorrectly returns an empty array [].
  • Followers / Following (/followers, /following):
    • GET https://api.trakt.tv/users/userb/following (Public API) returns [].
    • GET https://apiz.trakt.tv/users/userb/following (Private/Official API) returns [].
    • Note: GET /users/userb/friends works properly on both.
  • Compatibility Score (/match):
    • GET https://apiz.trakt.tv/v3/users/userb/match (Private/Official API) returns a 403 Forbidden error with the body User profile is private.

2. Private Data fully exposed to non-followers (Privacy Leak)

  • Favorites & Watchlist (/favorites, /watchlist):
    • GET https://apiz.trakt.tv/users/userb/favorites/media and GET https://apiz.trakt.tv/users/userb/watchlist return the full lists, even when the profile is private and the requesting user is not an approved follower or friend. This leak happens on both api.trakt.tv and apiz.trakt.tv endpoints.

3. List Privacy Setting Inconsistencies

When testing the privacy configuration of custom lists via /lists on both APIs:

  • GET https://api.trakt.tv/users/userb/lists
  • GET https://apiz.trakt.tv/users/userb/lists

The following behavior is observed:

  • Private (private): Correctly hidden from everyone, returning [] on both APIs (Working as expected).
  • Friends (friends): Incorrectly hidden from everyone, returning [] even for mutual friends. Even if User A and User B are verified friends, User A still receives [] instead of the list contents (Broken behavior).
  • Public (public): Correctly visible to everyone (Working as expected).

4. Working as Expected (No Issues)

  • Comments & Ratings (/comments, /ratings):
    • These endpoints correctly protect User B's privacy. They return data if User A is an approved follower/friend, and return 401 otherwise.

Expected Behavior

  1. Since User A is a mutual friend (approved follower) of User B, User A's authenticated OAuth token should be able to fetch User B's watched history, following/followers lists, and calculate the compatibility score (/match) across both public (api.trakt.tv) and private/official (apiz.trakt.tv) production endpoints.
  2. For privacy consistency, favorites and watchlist endpoints should return 403 Forbidden / User profile is private to any user who is not a friend or approved follower of the private profile owner.
  3. Setting a list's privacy to friends should allow mutual friends to fetch the list contents while blocking non-followers.

Metadata

Metadata

Assignees

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