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.
Description
app/app/api/users/[id]/route.tsselectsprofileVisibilitybut never enforces it, and always returnsemailandwalletAddressregardless of the user'sshowEmail/showWalletAddressflags (both default tofalse). 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
app/app/api/users/[id]/route.ts(approx. lines 19-73)app/app/api/users/[id]/{posts,entries,stats,activity,followers,following}/route.tsprofileVisibilityand the requester's relationship (self / follower / public).emailandwalletAddressunless the requester is the user themselves or the correspondingshow*flag istrue.