Files
gitlabhq/spec/features
Robert Speicher 7d8b3a0314 Merge branch '19102-fix' into 'master'
Fix an information disclosure when requesting access to a group containing private projects

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/19102.

The commit speaks for itself:

    Fix an information disclosure when requesting access to a group containing private projects
    
    The issue was with the `User#groups` and `User#projects` associations
    which goes through the `User#group_members` and `User#project_members`.
    
    Initially I chose to use a secure approach by storing the requester's
    user ID in `Member#created_by_id` instead of `Member#user_id` because I
    was aware that there was a security risk since I didn't know the
    codebase well enough.
    
    Then during the review, we decided to change that and directly store the
    requester's user ID into `Member#user_id` (for the sake of simplifying
    the code I believe), meaning that every `group_members` / `project_members`
    association would include the requesters by default...
    
    My bad for not checking that all the `group_members` / `project_members`
    associations and the ones that go through them (e.g. `Group#users` and
    `Project#users`) were made safe with the `where(requested_at: nil)` /
    `where(members: { requested_at: nil })` scopes.
    
    Now they are all secure.

See merge request !1973
2016-06-27 18:41:31 +00:00
..
2016-06-23 16:13:42 -05:00
2016-06-16 08:24:13 +05:30
2016-06-23 16:47:03 +02:00
2016-05-16 12:25:37 -05:00
2016-06-14 11:38:34 +02:00
2016-06-21 11:52:51 +01:00
2016-06-17 11:52:22 +01:00
2016-06-10 01:05:09 +03:00