12112 Commits
Author SHA1 Message Date
Robert SpeicherandTomasz Maczukin 6de76857d1 Merge branch '17298-wiki-xss' into 'master'
Forbid scripting for wiki files

Wiki files (not pages - files in the repo) are just sent to the browser
with whatever content-type the mime_types gem assigns to them based on
their extension. As this is from the same domain as the GitLab
application, this is an XSS vulnerability.

Set a CSP forbidding all sources for scripting, CSS, XHR, etc. on these
files.

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

See merge request !1969
2016-06-14 19:45:24 +02:00
Douwe MaanandTomasz Maczukin 18968821dd Merge branch 'fix/unauthorized-access-to-build-data' into 'master'
Remove 'unscoped' from project builds selection

This is a fix for this security bug: https://gitlab.com/gitlab-org/gitlab-ce/issues/18188

/cc @kamil @grzegorz @stanhu

See merge request !1968
2016-06-14 19:45:11 +02:00
Robert SpeicherandRobert Speicher 0f295530fe Merge branch 'rs-notes-privilege-escalation' into 'master'
Prevent privilege escalation via notes API

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/15577

See merge request !1964
2016-04-26 16:20:54 -04:00
Robert SpeicherandRémy Coutable 3b72afe0e1 Merge branch '15437-fix-xss-in-issue-tracker-service' into 'master'
Prevent XSS via custom issue tracker URL

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

See merge request !1955

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-04-26 10:33:42 +02:00
Robert SpeicherandRobert Speicher b6b7bb530b Merge branch '15591-fix-project-leak-in-new-mr-view' into 'master'
Prevent information disclosure via new merge request page

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/15591.

See merge request !1963
2016-04-25 17:14:07 -04:00
Robert SpeicherandRobert Speicher 017f87e8cd Merge branch 'fix-impersonation-issue' into 'master'
Prevent privilege escalation via "impersonate" feature

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/15548

See merge request !1956
2016-04-25 16:55:12 -04:00
Robert SpeicherandRobert Speicher 30dc15f43e Merge branch 'fix-private-snippet-api' into 'master'
Prevent information disclosure via snippet API

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/15580

See merge request !1958
2016-04-25 16:41:14 -04:00
Grzegorz BizonandRobert Speicher 8dc82011f5 Merge branch 'fix/private-labels-permissions' into 'master'
Fix vulnerability that leaks private labels and milestones

This fixes vulnerability that leaks information about private labels and milestones because of  insecure direct object reference in issueable create service.
This affects merge requests and issues.

See https://gitlab.com/gitlab-org/gitlab-ce/issues/15439

This MR introduces additional check that rejects labels and milestone that does not belong to the same project issue/merg request does.

`IssuableBaseService` may benefit from encapsulating filters in separate class/module, which then may improve coherency in this class.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/15439

See merge request !1954
2016-04-25 16:18:16 -04:00
Jacob SchatzandRobert Speicher 5c7de4358e Merge branch 'issue_15434' into 'master'
Fixes XSS injection

REF: https://gitlab.com/gitlab-org/gitlab-ce/issues/15434

**Without the fix**

![xss1](/uploads/0a7b0b15fb87066965a7c73f1dbaa815/xss1.gif)


**With the fix**

![xss2](/uploads/473cfa0aa80656f24c58aebf1fd97fff/xss2.gif)


See merge request !1952
2016-04-25 16:01:36 -04:00
Douwe MaanandRémy Coutable 2c9cd67f78 Merge branch 'rs-issue-15126' into 'master'
Remove persistent XSS vulnerability in `commit_person_link` helper

Because we were incorrectly supplying the tooltip title as
`data-original-title` (which Bootstrap's Tooltip JS automatically
applies based on the `title` attribute; we should never be setting it
directly), the value was being passed through as-is.

Instead, we should be supplying the normal `title` attribute and letting
Rails escape the value, which also negates the need for us to call
`sanitize` on it.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/15126

See merge request !1948

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-04-19 17:35:32 +02:00
Rémy CoutableandRémy Coutable 4a9f5ef931 Merge branch 'fix/2fa-authentication-spoofing' into 'master'
Fix 2FA authentication spoofing

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.

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.

Current 2FA code is a bit tricky, so it probably needs some refactoring.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-04-07 17:33:47 +02:00
Douwe MaanandRémy Coutable d583ef6f6c Merge branch 'fix-bad-fetch' into 'master'
Don't fetch any tags from a forked repo

Closes #13957

See merge request !3504

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-04-05 16:11:46 +02:00
Jacob Vosmaer bf253a1087 Obtain lease before querying LDAP 2016-03-11 13:47:49 +01:00
Douwe MaanandRémy Coutable 5daf8923ef Merge branch 'fix-filtered-pagination' into 'master'
Allow filtered explore results to be paged. Fixes #14104

See merge request !3149
2016-03-10 18:48:35 +01:00
Rémy Coutable f8e220b6ff Fix "Show all" link behavior
Fixes #14168
2016-03-10 15:32:17 +01:00
Douglas Barbosa AlexandreandRémy Coutable fe4d3abead Merge branch 'fix-todos' into 'master'
Fix error 500 in Todos

Closes #14095

Closes #14075

Closes #14109

Closes #14151

See merge request !3141
2016-03-10 10:35:34 +01:00
Robert SpeicherandRémy Coutable f38f579728 Merge branch 'add_show_role_boolean_to_group_member_view' into 'master'
Only show group member roles if explicitly requested

This very simply fixes an EE problem, but I made the change here so it's less prone to errors from merges.

In EE, prior to this change, group member roles were shown in project member list when a project is shared with a group. This is bad because the project explicitly shares with the group and sets a 'max access' level. If the max access level is 'developer' the project owner doesn't want to see 'Owner' in the group roles because it will confuse them. I verified that permissions are really being honored here, it was just an error in the view. You can see in https://gitlab.com/gitlab-org/gitlab-ee/blob/master/app/views/projects/project_members/_shared_group_members.html.haml#L18 where this was how it was intended to be. Likely a CE-EE merge introduced this bug. That's why I made the boolean required in CE even though this is for EE.

![Screen_Shot_2016-03-01_at_8.59.02_AM](/uploads/704ab3149f60c363dd8374bd0c06a46a/Screen_Shot_2016-03-01_at_8.59.02_AM.png)

![Screen_Shot_2016-03-01_at_9.17.54_AM](/uploads/5fcabef352cbc41dade037767f90ace3/Screen_Shot_2016-03-01_at_9.17.54_AM.png)

See merge request !3044
2016-03-08 12:22:55 +01:00
Rémy Coutable 60f9ce6af8 Merge branch 'fix/invalidate-builds-badge-cache' into 'master'
Invalidate cache for builds badge

This fixes cache issue with badges (we should not cache badge images).

Closes #13982

See merge request !3086
2016-03-04 13:20:49 +01:00
Rémy Coutable 45469dd2de Merge branch 'renaming-repository-caching' into 'master'
Flush repository caches before renaming projects

This should hopefully solve gitlab-org/gitlab-ce#13790. Once I know the exact steps to reproduce the problem I should be able to confirm this.

cc @dblessing @inem

See merge request !2974
2016-03-03 16:37:24 +01:00
Douwe MaanandRémy Coutable e75989db43 Merge branch 'fix/13785-dashboard-projects-display-welcome-after-search' into 'master'
Don't show "Welcome to GitLab" when the search didn't return any projects

Fixes #13785. /cc @pixdrift

### Before

![Screen_Shot_2016-03-02_at_10.55.02](/uploads/b6b6ead2143d01e374ad296e72182d79/Screen_Shot_2016-03-02_at_10.55.02.png)

### After

![Screen_Shot_2016-03-02_at_12.12.33](/uploads/6e16c44e69039c534ea0fc3373c6060b/Screen_Shot_2016-03-02_at_12.12.33.png)

See merge request !3059
2016-03-02 14:06:00 +01:00
Rémy Coutable 5d534a1d4b Merge branch 'fix/13781-delete-tag-without-ajax' into 'master'
Tag deletion doesn't use AJAX anymore

See merge request !2986
2016-03-02 14:05:38 +01:00
Douwe MaanandRémy Coutable 4d857c08d5 Merge branch 'fix/deprecated-ci-badge-permissions' into 'master'
Fix permissions for deprecated CI build status badge

This fixes permissions for deprecated status badge, being unavailable even if project is public.

Closes #13324

See merge request !3030
2016-03-02 12:08:21 +01:00
Douwe MaanandRémy Coutable 26959be0cf Merge branch 'issue_13623' into 'master'
Show days remaining instead of elapsed time for Milestone.

Closes #13623

See merge request !2978
2016-03-02 11:57:50 +01:00
Rémy Coutable 1c3d8aaeef Merge branch 'shortcuts-help' into 'master'
Fix help keyboard shortcut for relative URL setups

Fixes gitlab-org/gitlab-ce#12751

See merge request !3016
2016-03-02 10:46:52 +01:00
Dmitriy ZaporozhetsandRémy Coutable c081928d06 Merge branch 'sidebar-overlap-fix' into 'master'
Fix issue with overlap of sidebar links.

Thanks @iamphill for the help with this one. 

![Screen_Shot_2016-03-01_at_10.19.52_AM](/uploads/f203fde79ae397ad18f23c4108f1c306/Screen_Shot_2016-03-01_at_10.19.52_AM.png)

cc @iamphill @alfredo1 @dzaporozhets @rymai 

See merge request !3043
2016-03-01 17:34:16 +01:00
Douwe MaanandRémy Coutable c05bb00737 Merge branch 'rs-improve-grace-period' into 'master'
Don't show any "2FA required" message if it's not actually required

Prior, if the user had enabled and then disabled 2FA, they would be
shown a "You must enable Two-factor Authentication for your account."
message when going back to re-activate it, even if 2FA enforcement was
disabled.

See merge request !3014
2016-03-01 17:04:32 +01:00
Dmitriy ZaporozhetsandRémy Coutable e11ab453ee Merge branch 'issue_13648' into 'master'
Improve implementation to check read access to forks and add pagination.

Fixes #13648

The following optimizations where made:

- Pagination was added.
- Code to check for read permissions to forks was optimized, in the past we were doing too many queries for each project.

See merge request !2991
2016-03-01 12:13:32 +01:00
Douwe MaanandRémy Coutable 9052086d7b Merge branch 'issue_13621' into 'master'
Don't repeat labels listed on Labels tab.

Fixes #13622

See merge request !2924
2016-03-01 12:13:04 +01:00
Rémy Coutable 5c8f6ba3dd Merge branch 'issue_13851' into 'master'
Brings back missing "Gitlab" text on the logo

Closes #13851 

See merge request !2989
2016-03-01 11:57:27 +01:00
Douwe MaanandRémy Coutable 5a3c5ace67 Merge branch '11489-branded-appearance-to-ce' into 'master'
Branded appearance to CE

Closes #11489

The difference with the EE version is only that there is no distinction between light and dark logos, though this wasn't used anyway. If this is fine, I'll create a MR on EE too.

TODO:
- [x] Copy docs
- [x] Make new screenshots
- [ ] Remove Custom Welcome message feature?

@rymai: I was unsure what labels to add to ping you, so I just ping you like this 😉

/cc @DouweM

See merge request !2927
2016-03-01 11:41:03 +01:00
Rémy Coutable 3510569eb6 Merge branch 'sidebar-hide-class' into 'master'
Created helper class to hide content in issue sidebar when collapsed

![Screen_Shot_2016-02-25_at_10.38.39](/uploads/ca49cc230edf7e71b7726e905f523092/Screen_Shot_2016-02-25_at_10.38.39.png)

Closes #13764

See merge request !2968
2016-02-26 17:49:04 +01:00
Robert SpeicherandRémy Coutable 70090bd8a6 Merge branch 'fix-todos' into 'master'
Does not create a Todo when commenting on commit or project snippet

Closes #13733

See merge request !2964
2016-02-26 16:47:54 +01:00
Rémy Coutable 184b4bc6d5 Merge branch 'rs-crowd-form-view-spec' into 'master'
Move "I should see Crowd login form" feature to a view spec

We were doing all kinds of code gymnastics to "enable" Crowd in the
feature spec and this would sometimes cause a transient failure.

Really what it's testing is if the Crowd login form shows when Crowd's
enabled, so this is much better suited to a view spec.

See merge request !2963
2016-02-26 16:46:46 +01:00
Jacob SchatzandRémy Coutable b0864a9f5d Merge branch 'feature/jschatz1/sidebar-sizing' into 'master'
Sidebar overlaps content when screen is below 1200px.

When screen is below 1200px, the sidebar overlaps.
When screen is above 1200px, the sidebar pushes content out.
z-index change to make sure hamburger stays on top.
Fixes #12717
![screensize](/uploads/9a21fa06d583a49d6ebbf1ada34c6792/screensize.gif)

![screensize-small](/uploads/7c25f46e962248a40840562a01c83f8f/screensize-small.gif)

Also sorry I couldn't get the collapse button in the screen cap. It's there.

See merge request !2620
2016-02-26 16:46:27 +01:00
Jacob SchatzandRémy Coutable fa82f67f86 Merge branch 'highlighted-note' into 'master'
Changed padding & background color for highlighted notes

Closes #12453

![Screen_Shot_2016-02-23_at_11.18.59](/uploads/19150d884fd1175fe0df5f6daee64206/Screen_Shot_2016-02-23_at_11.18.59.png)

See merge request !2937
2016-02-24 13:02:37 +01:00
Jacob SchatzandRémy Coutable 069fec4f43 Merge branch 'fix-moving-revert-button' into 'master'
Fixed revert button tooltip placement causing movement

Before:

![moving-tooltip](/uploads/65cb9a41e8b8114fd8ee10d68cfd8206/moving-tooltip.gif)

After:

![moving-tooltip](/uploads/a1c36eb5735dc7592c49f6b5cb1469b5/moving-tooltip.gif)

See merge request !2910
2016-02-24 12:50:13 +01:00
Rémy Coutable c89ee575bd Merge branch 'bugfix/jschatz1/missing-project-button' into 'master'
Fix group projects styles

Makes new project button visible when no projects are available.
Fixes #13193

![Screen_Shot_2016-02-04_at_1.08.27_PM](/uploads/36be9d5892506e7d1abcf4eb2a622e12/Screen_Shot_2016-02-04_at_1.08.27_PM.png)

![Screen_Shot_2016-02-04_at_1.07.48_PM](/uploads/fa257a1965017ff1274572dc66fccf90/Screen_Shot_2016-02-04_at_1.07.48_PM.png)

![Screen_Shot_2016-02-04_at_1.07.28_PM](/uploads/326f6fdac24b56e8408efd0d11dc2805/Screen_Shot_2016-02-04_at_1.07.28_PM.png)

cc @creamzy @skyruler

See merge request !2714
2016-02-24 12:03:09 +01:00
Jacob SchatzandRémy Coutable 11cb6e84fe Merge branch 'issue-sidebar-content-scrolling' into 'master'
Fixed issue with content in the issue sidebar disappearing

Closes #13626

See merge request !2919
2016-02-24 10:50:04 +01:00
Robert SpeicherandRémy Coutable 85f3dabefa Merge branch 'hudecof/show-crowd-login-form-when-signin-disabled' into 'master'
Show Crowd login even when sign-in is disabled

Fixes #13176.

See merge request !2749
2016-02-24 09:18:28 +01:00
Robert SpeicherandRémy Coutable 11b6c8c30b Merge branch 'fix-todos' into 'master'
Does not raise an error when Todo  is already marked as done

Closes #13681

See merge request !2926
2016-02-24 09:13:29 +01:00
Jacob SchatzandRémy Coutable dd94a4f780 Merge branch 'dz-small-ui-fixes' into 'master'
Set of UI fixes

* Improve wiki pages
* Improve profile pages

cc @skyruler

See merge request !2758
2016-02-23 16:53:26 +01:00
Jacob SchatzandRémy Coutable 1f368f2bc3 Merge branch 'milestone-drag-empty-list' into 'master'
Issues can be dragged & dropped into empty milestone lists

This is also possible with MRs. Also fixed an issue where MRs weren't sortable

Fixes #13668

![milestone](/uploads/aada0f48ce8b1407cce920eef3f4d5f3/milestone.gif)

See merge request !2935
2016-02-23 14:08:29 +01:00
Rémy Coutable 08ac2f2956 Merge branch 'fix/13631-error-with-merged-mr' into 'master'
Ensure we don't check a commit's description for revert message if it has no description

Fixes #13631.

/cc @razer6 @grzesiek @yorickpeterse @rdavila 

See merge request !2917
2016-02-23 11:29:33 +01:00
Jacob SchatzandRémy Coutable 29ad1cedef Merge branch 'issue_13463' into 'master'
Fix Side-by-side view after loading diff results

Fixes #13463

See merge request !2880
2016-02-23 11:29:18 +01:00
Rémy Coutable b79c932b10 Merge branch 'fix-failing-issue-tests' into 'master'
Fixed failing issues tests

Also removed up/down vote icons from merge requests. Was missed from d8069bd858

See merge request !2911
2016-02-23 11:28:48 +01:00
Rémy Coutable 31986354ab Merge branch 'fix-zero-votes-showing-on-issue-list' into 'master'
Only show up or down votes icon on issue list if there are any

Closes #13649 

![Screen_Shot_2016-02-22_at_10.20.27](/uploads/21477426856dab9731bb110032025867/Screen_Shot_2016-02-22_at_10.20.27.png)

See merge request !2909
2016-02-22 11:25:20 +01:00
Douglas Barbosa AlexandreandRémy Coutable 41f1b3dede Merge branch 'tasks' into 'master'
Add Todos

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/2425

Tasks:

-  Prepare database
 - [X] Create a new table (`todos`)
- Tasks Queue view
 - [X] Add a number icon showing the number of todos on the top right next to the new and logout button that will redirect the user to the todos page
 - [X] Add a chronological list of todos, with the 'Todos' tab active by default
 - [X] Add a 'Done' button to each todo
 - [x] Add filters (project, author, type, and action)
- Todos generation
 - [X] When user issue/mr is assgined to someone
 - [x] When user is mentioned on (issues/mr's/comments)
- Mark todo as `done`
 - [X] When clicks on the 'Done' button
 - [X] When edit issue/mr
 - [X] When left/edit a comment
 - [X] When reassign issue/mr
 - [X] When add/remove labels to issue/mr
 - [X] When issue/mr is closed
 - [X] When mr is merged
 - [X] When added an emoji
 - [X] When changed the issue/mr milestone

* Screenshot:

![Screenshot_2016-02-20_12.45.57](/uploads/4b2554b1bde25aed3347e1ae41e8e0c0/Screenshot_2016-02-20_12.45.57.png)

See merge request !2817
2016-02-22 08:47:44 +01:00
Douwe MaanandRémy Coutable b947661ce6 Merge branch 'merge-when-succeeded' into 'master'
Fix bugs in MergeWhenSucceeded

1. This fixes support for merge when succeeded for statuses without ref.
2. This fixes support for merge when succeeded for multiple stages. Stages are created after all builds for previous one are finished.

Fixes: https://gitlab.com/gitlab-org/gitlab-ce/issues/9060 https://gitlab.com/gitlab-org/gitlab-ce/issues/8108 https://gitlab.com/gitlab-org/gitlab-ce/issues/12931 https://gitlab.com/gitlab-org/gitlab-ce/issues/13269

/cc @grzesiek @DouweM @rspeicher 


See merge request !2894
2016-02-22 08:47:20 +01:00
Jacob SchatzandRémy Coutable f79bb559e2 Merge branch 'award-emoji-retina' into 'master'
Award emoji supports retina displays

Based on discussion in !2800

There is now a retina spritesheet for emojis. It is 2mb, don't know how big an issue that is.

Before:

![Screen_Shot_2016-02-19_at_11.07.25](/uploads/ea412579bcaddfd13fce67bf583de61b/Screen_Shot_2016-02-19_at_11.07.25.png)

After:

![Screen_Shot_2016-02-19_at_11.07.36](/uploads/9d44c6278ba31987bad03dc1f46edd8b/Screen_Shot_2016-02-19_at_11.07.36.png)

Also updated the rake task to make the @2x spritesheet https://gitlab.com/snippets/15348

cc\ @rspeicher @vsizov 

See merge request !2891
2016-02-21 21:06:58 +01:00
Douwe MaanandRémy Coutable 20b3be6e24 Merge branch 'flush-cache-web-editor' into 'master'
Flush emptiness caches whenever needed



See merge request !2903
2016-02-21 21:06:44 +01:00