Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion api/dashboard/user/dash_user_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,6 @@ def get(self, request):
queryset = (
User.objects.all()
.select_related("wallet_user")
.filter(user_settings_user__is_public=True)
.prefetch_related("user_settings_user")
.order_by("-wallet_user__karma")
)
Comment on lines 628 to 633

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P0 security Private profiles exposed on an unauthenticated public endpoint

UserSearchAPI has no authentication_classes = [CustomizePermission] declaration, making it accessible without any JWT. The removed filter was the only guard preventing private profiles from appearing in results. user_settings.is_public defaults to 0 (false) in the schema, so the majority of users who never explicitly opted in are now discoverable — including their id, full_name, muid, profile_pic, karma, organizations, and interest_groups — by any unauthenticated caller.

Every other privacy boundary in the codebase enforces this invariant: profile_view.py gates five separate profile sub-endpoints on is_public, mulearner_views.py filters with user_settings_user__is_public=True, and external_api_views.py rejects private profiles with 403. Removing this single line breaks the contract users relied on when they left (or set) their visibility to private.

Expand Down
Loading