This repository was archived by the owner on Jul 18, 2026. It is now read-only.
fix(spotify): profile identity from the session, not spclient (v1.1.0)#97
Merged
Conversation
…1.1.0) `/user-profile-view/v3/profile/me` on spclient.wg.spotify.com is NOT session-bound: called with a token that is not tied to a user it still returns 200, with `uri: "spotify:user:me"` and a fixed stranger's name/avatar/follower counts (reproduced with a fresh anonymous token - every caller gets the same foreign profile). The connector read display_name/avatar/counts from there while taking id/uri from the session GraphQL query, so every user's export was stamped with that stranger's identity over their own id and their own collected data. Identity now comes only from the session-bound GraphQL `me` (profileAttributes). spclient is used strictly as enrichment (avatar + counts, which GraphQL does not expose) and only when its `uri` matches the resolved identity; the "spotify:user:me" sentinel is rejected. If the session profile cannot be resolved the run fails clearly instead of silently importing someone else. Claude-Session: https://claude.ai/code/session_01DYpJrHgZxFcFW9apg9uPaa
Schema Health Check — Non-blocking inherited issues44/50 scopes consistent | 6 inherited Gateway gap(s) | no new blocking issues in this PR |
Refines the enrichment call after confirming the exact root cause (matches the interrogator report): the trailing path segment of /user-profile-view/v3/profile/<name> is a literal vanity username, not a self-alias, and a real user owns the username "me" (open.spotify.com/user/me => "Micael Widell"). Passing "me" returned that stranger's avatar/counts for everyone. Now the profile-view is fetched for the session-resolved username (pa.username), so avatar + follower/following counts are the user's own again instead of being dropped. The uri-equality guard stays as defense-in-depth. Claude-Session: https://claude.ai/code/session_01DYpJrHgZxFcFW9apg9uPaa
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Spotify exports were stamped with a stranger's name and avatar ("Micael Widell") over the user's own account.
Root cause
The connector built
spotify.profilefrom two sources:id/urifrom the session-bound GraphQLmequery (correct), butdisplay_name/avatar/follower-counts fromspclient.wg.spotify.com/user-profile-view/v3/profile/me. That spclient endpoint is not session-bound - called with a token that is not tied to a user it still returns 200 withuri: "spotify:user:me"and a fixed foreign profile. So the merged record carried the user's real id and real collected tracks, but someone else's name/photo/counts.Reproducible with a fresh anonymous token (no login, no cookies) - every caller gets the same foreign profile:
Fix
id,display_name,uri) comes only from the session GraphQLprofileAttributes.me.uriequals the resolved identity; thespotify:user:mesentinel is rejected.Follow-up (separate)
Every user who already connected Spotify has a
spotify.profilerecord with the wrong name/avatar in their PS - needs a re-collect or a one-off rewrite. Will file a ticket.