Skip to content

leak users #885

Closed
Closed

Description

@lbeziaud

Hi,

The Django REST framework leaks the list of users (with emails) through the "collaborators" selector of the HTML competition submission form (bottom of the page https://www.codabench.org/api/competitions/).

Screenshot from 2023-05-22 14-52-30

Edit: Seems it only works when logged in 🙌. The extraction is possible through the GUI "Add collaborator" auto completion feature, but giving out the list like that might not be desired.

Activity

  1. Didayolo commented on May 22, 2023

    @Didayolo
    Member

    Good catch, thank you for reporting this problem.

    When using the editor through the UI to add collaborators, the behavior is as excepted:

    Not able to see the email when not logged in as an administrator of the platform:

    Capture d’écran 2023-05-22 à 17 05 59

    Able to see the email when logged in as an administrator of the platform:

    Capture d’écran 2023-05-22 à 17 06 38

    It seems that, using the REST API, the emails are always given? That is an important leakage that we need to fix.

  2. lbeziaud commented on May 22, 2023

    @lbeziaud
    ContributorAuthor

    Emails are indeed given although I'm no admin. I reported the issue while looking at /competitions but the email issue is more obvious by looking at https://www.codabench.org/api/participants/. Seems the API is not following the email access rights you describe for the UI (visible only when admin). I'm not familiar with Django REST framework but I guess
    the issue is with CompetitionParticipantViewSet or CompetitionParticipantSerializer.

    Edit: Maybe that's another issue but /competitions is also not consistent with the rights defined by CompetitionViewSet. The later lists competitions belonging to someone else only if published, whereas the former lists all competitions. That's not a big privacy issue but the access right might need some "unification". Maybe by being defined at the API level rather than through views?

  3. added
    P1
    Post-it
    on May 23, 2023
  4. Didayolo commented on Jun 12, 2023

    @Didayolo
    Member

    I close this issue to keep track of this directly in the PR.

  5. Didayolo commented on Jun 30, 2023

    @Didayolo
    Member

    I re-open this issue because #929 got reverted. Indeed, this change is breaking the organizer interface used to approve / revoke participants (the buttons simply stops working).

    We therefore need to:

  6. Didayolo commented on Jul 5, 2023

    @Didayolo
    Member

    Related: #1008

  7. ihsaan-ullah commented on Aug 14, 2023

    @ihsaan-ullah
    Collaborator

    @Didayolo this issue is done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1Post-it

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions