Skip to content

User profile API ignores privacy settings and always returns email and wallet address #353

Description

@3m1n3nc3

Description

app/app/api/users/[id]/route.ts selects profileVisibility but never enforces it, and always returns email and walletAddress regardless of the user's showEmail / showWalletAddress flags (both default to false). This applies to any caller, including anonymous requests, and the profile sub-resource endpoints (posts, entries, stats, activity, followers, following) have no privacy gating either.

The result is a PII leak: any user's email and Stellar wallet address are publicly readable, and "private" profiles are fully visible.

More info

  • File: app/app/api/users/[id]/route.ts (approx. lines 19-73)
  • Files: app/app/api/users/[id]/{posts,entries,stats,activity,followers,following}/route.ts
  • Gate the response by profileVisibility and the requester's relationship (self / follower / public).
  • Strip email and walletAddress unless the requester is the user themselves or the corresponding show* flag is true.
  • Add tests asserting a third party cannot read email/wallet of a user with the default privacy settings.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignStellar WaveIssues in the Stellar wave programapibugSomething isn't workingprivacysecurity

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions