summaryrefslogtreecommitdiff
path: root/spec/controllers
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'dev/master' into 'master'Robert Speicher2016-05-023-20/+143
|\
| * Fix typoDouwe Maan2016-04-221-1/+1
| |
| * Fix issue with impersonationDouwe Maan2016-04-223-20/+143
| |
* | Handle issue move access instead of raising errorfix/handle-issue-move-accessGrzegorz Bizon2016-04-301-0/+39
| | | | | | | | Closes #15533
* | Backport GitHub Enterprise import support from EEStan Hu2016-04-261-0/+2
|/ | | | | | | | | | These changes were pulled from GitLab EE to support configuring an alternative API URL than the default https://api.github.com. In addition, the `verify_ssl` flag allows users to disable SSL cert checking. One modification: add a default `args` option if it does not exist to avoid breaking existing configurations.
* Merge branch 'rs-diff_view' into 'master' Rémy Coutable2016-04-221-8/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Always read diff_view setting from the cookie Prior, when the user had their view set to "parallel" and then visited a merge request's changes tab _without_ passing the `view` parameter via query string, the view would be parallel but the `Notes` class was always instantiated with the default value from `diff_view` ("inline"), resulting in broken markup when the form to add a line note was dynamically inserted. The cookie is set whenever the view is changed, so this value should always be up-to-date. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/14557 and https://gitlab.com/gitlab-org/gitlab-ce/issues/15285 See merge request !3732
| * Clarify that the diff view setting always comes from the cookiers-diff_viewRobert Speicher2016-04-191-8/+0
| | | | | | | | This invalidates one test, which we've removed.
* | Merge branch 'issue_5838' into 'master' Rémy Coutable2016-04-211-0/+16
|\ \ | | | | | | | | | | | | | | | | | | Show project members only for members fixes #5838 See merge request !3752
| * | Add changelog entry and fix convention in a specissue_5838Felipe Artur2016-04-201-1/+1
| | |
| * | Projects members tab should follow visibility levelsFelipe Artur2016-04-181-13/+2
| | |
| * | Show project members only for membersFelipe Artur2016-04-181-0/+27
| | |
* | | Merge branch 'pmq20/gitlab-ce-issue_12785'Douwe Maan2016-04-191-0/+51
|\ \ \
| * | | Add support to cherry-pick any commitP.S.V.R2016-04-181-0/+51
| | | | | | | | | | | | | | | | | | | | Issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/12785 Merge Request: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3514
* | | | Check permissions when sharing project with groupGrzegorz Bizon2016-04-191-0/+50
| |/ / |/| | | | | | | | Closes #15330
* | | Remove group members checkFelipe Artur2016-04-181-3/+5
| | |
* | | Insert users check into apiFelipe Artur2016-04-181-2/+0
| | |
* | | Code fixesFelipe Artur2016-04-181-1/+1
| | |
* | | Fix specsFelipe Artur2016-04-181-1/+3
| | |
* | | Fix codeFelipe Artur2016-04-182-3/+3
| | |
* | | Add specs and fix codeFelipe Artur2016-04-182-0/+41
|/ /
* | Merge branch 'assign-to-issuable-opener' into 'master' Jacob Schatz2016-04-151-2/+22
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issuable can be assigned to author Closes #9014 The only difference with #9014 is that I thoughed the author should also be able to assign the issue. If this is unwanted behavior Ill revert it. /cc @DouweM See merge request !2765
| * \ Merge branch 'master' into assign-to-issuable-openerZeger-Jan van de Weg2016-04-153-2/+80
| |\ \
| * \ \ Merge branch 'master' into assign-to-issuable-openerZeger-Jan van de Weg2016-04-052-13/+4
| |\ \ \
| * \ \ \ Merge branch 'master' into assign-to-issuable-openerZeger-Jan van de Weg2016-03-2920-145/+673
| |\ \ \ \
| * | | | | Revert authors ability to assign anyoneZeger-Jan van de Weg2016-02-221-2/+2
| | | | | |
| * | | | | Issuable can be assigned to authorZeger-Jan van de Weg2016-02-221-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes #9014 The only difference with #9014 is that I thoughed the author should also be able to assign the issue. If this is unwanted behavior Ill revert it.
* | | | | | Make /profile/keys/new redirects to /profile/keys for back-compatRémy Coutable2016-04-151-1/+11
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | Report: https://github.com/gitlabhq/gitlabhq/issues/10138 Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | | Merge branch 'issue_15044' into 'master' Rémy Coutable2016-04-131-0/+28
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow to close invalid merge request fixes #15044 See merge request !3664
| * | | | | Add changelog entry, improve specs and model codeissue_15044Felipe Artur2016-04-121-5/+4
| | | | | |
| * | | | | Allow to close invalid merge requestFelipe Artur2016-04-111-0/+29
| | | | | |
* | | | | | Fix specs for Projects::NotificationSettingsControllerDouglas Barbosa Alexandre2016-04-121-28/+0
| | | | | |
* | | | | | Improve specs for group/project notification controllerdecouple-member-notificationDouglas Barbosa Alexandre2016-04-122-3/+53
| | | | | |
* | | | | | Requires user to be signed in when changing notification settingsDouglas Barbosa Alexandre2016-04-112-0/+48
|/ / / / /
* | | | | Merge branch 'issue_14012' into 'master' Rémy Coutable2016-04-071-0/+6
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix problem when creating milestones in groups without projects Fixes #14012 See merge request !3481
| * | | | | Implement review suggestionsFelipe Artur2016-04-071-1/+1
| | | | | |
| * | | | | Improve codeFelipe Artur2016-04-051-1/+1
| | | | | |
| * | | | | Fix problem when creating milestones in groups without projectsFelipe Artur2016-04-051-0/+6
| | |_|/ / | |/| | |
* | | | | Merge branch 'fix/2fa-authentication-spoofing' into 'master' Rémy Coutable2016-04-071-0/+101
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix 2FA authentication spoofing ## Summary This is security fix for vulnerability described at https://gitlab.com/gitlab-org/gitlab-ce/issues/14900. Attacker was able to bypass password authentication of users that have 2FA enabled, and consequently sign is as a different user, without knowing his password, if he managed to guess 2FA One Time Password for that user. It was also possible to enumerate users and check if they have 2FA enabled, because GitLab responded with different error for each case. ## Fix This MR attempts to change default user search scope if `otp_user_id` session variable has been set. If it is present, it means that user has 2FA enabled, and has already been verified with login and password. In this case we should look for user with `otp_user_id` first, before picking it up by `login`. Both, 2FA authentication spoofing and 2FA discovery have been covered by specs. ## Further work Current 2FA code is a bit tricky, so it probably needs some refactoring. See merge request !1947
| * | | | | Make sessions controller specs more explicitGrzegorz Bizon2016-04-071-4/+5
| | | | | |
| * | | | | Fix 2FA authentication spoofing vulnerabilityGrzegorz Bizon2016-04-071-35/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit attempts to change default user search scope if otp_user_id session variable has been set. If it is present, it means that user has 2FA enabled, and has already been verified with login and password. In this case we should look for user with otp_user_id first, before picking it up by login.
| * | | | | Add specs for sessions controller including 2FAGrzegorz Bizon2016-04-061-0/+93
| | |_|_|/ | |/| | | | | | | | | | | | | This also contains specs for a bug described in #14900
* | | | | Merge branch 'fix_14638' into 'master' Rémy Coutable2016-04-071-0/+23
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #14638. The SQL query was ambiguous and in this case we want to filter projects. See merge request !3462
| * | | | | Fixes #14638.PotHix2016-04-061-0/+23
| |/ / / / | | | | | | | | | | | | | | | The SQL query was ambiguous and in this case we want to filter projects.
* | | | | Return status code 303 after a branch DELETE operation to avoid project deletionStan Hu2016-04-061-0/+14
|/ / / / | | | | | | | | | | | | Closes #14994
* | | | Merge branch 'fix-project-path-rename' into 'master' Stan Hu2016-04-051-0/+22
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix Error 500 after renaming a project path Renaming the path of a project would result in an Error 500 due to `@repository` being memoized with the old path. An Error 500 would result: ``` Started GET "/testing2/test1" for 127.0.0.1 at 2016-04-04 12:42:30 +0000 Processing by ProjectsController#show as HTML Parameters: {"namespace_id"=>"testing2", "id"=>"test1"} Completed 200 OK in 637ms (Views: 194.2ms | ActiveRecord: 111.8ms) Started GET "/testing2/test1/edit" for 127.0.0.1 at 2016-04-04 12:42:33 +0000 Processing by ProjectsController#edit as HTML Parameters: {"namespace_id"=>"testing2", "id"=>"test1"} Completed 200 OK in 594ms (Views: 183.8ms | ActiveRecord: 87.4ms) Started PATCH "/testing2/test1" for 127.0.0.1 at 2016-04-04 12:42:41 +0000 Processing by ProjectsController#update as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"[FILTERED]", "project"=>{"nam e"=>"test123", "path"=>"test123"}, "namespace_id"=>"testing2", "id"=>"test1"} Completed 500 Internal Server Error in 1852ms (ActiveRecord: 124.0ms) ActionView::Template::Error (no repository for such path): 2: %legend 3: Builds: 4: 5: - unless @repository.gitlab_ci_yml 6: .form-group 7: .col-sm-offset-2.col-sm-10 8: %p Builds need to be configured before you can begin using Contin uous Integration. app/models/repository.rb:59:in `block in empty?' lib/repository_cache.rb:19:in `fetch' app/models/repository.rb:59:in `empty?' app/models/repository.rb:471:in `gitlab_ci_yml' app/views/projects/_builds_settings.html.haml:5:in `_app_views_projects__build s_settings_html_haml__782034335636359229_73397600' app/views/projects/edit.html.haml:87:in `block in _app_views_projects_edit_htm l_haml___2388082585934859365_47390860' app/views/projects/edit.html.haml:8:in `_app_views_projects_edit_html_haml___2 388082585934859365_47390860' app/controllers/projects_controller.rb:54:in `block (2 levels) in update' app/controllers/projects_controller.rb:43:in `update' lib/gitlab/middleware/go.rb:16:in `call' ``` Closes #14885 See merge request !3528
| * | | | Fix Error 500 after renaming a project pathStan Hu2016-04-051-0/+22
| |/ / / | | | | | | | | | | | | Closes #14885
* | | | Respond 404 when unauthorized user imports membersfix/permissions-when-importing-membersGrzegorz Bizon2016-04-051-2/+2
| | | |
* | | | Do not leak project exists when importing membersGrzegorz Bizon2016-04-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | When importing members, and user does not have permissions to read members in a source project, do not leak information about source project existence. Notifiy user that project has not been found instead.
* | | | Check permissions when importing project membersGrzegorz Bizon2016-04-051-0/+49
|/ / / | | | | | | | | | Closes #14899
* | | Minor clean up on admin/users_controller_specZeger-Jan van de Weg2016-03-311-12/+3
| | |