583 Commits
Author SHA1 Message Date
Robert SpeicherandTomasz Maczukin c041db4f8d 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:24:18 +02:00
Douwe MaanandTomasz Maczukin 6d88aabd7c 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 15:30:16 +02:00
Douwe MaanandRobert Speicher 1322bd78cf Merge branch 'rs-issue-4032' into 'master'
Fix note polling

Closes #4032

See merge request !2084
2015-12-15 12:16:17 -05:00
Grzegorz BizonandRobert Speicher 23975e093b Merge branch 'fix/award-emoji-conflict-in-notes' into 'master'
Fix problems with award-emoji-only comment

This fixes a conflict between note with only a single emoji in content
and award-emojis mechanisms.

Closes #3734 

cc @vsizov

See merge request !1936
2015-12-07 14:33:36 -05:00
Robert SpeicherandRobert Speicher dbcd646296 Merge branch 'award_fix' into 'master'
Emoji bug: Invalid url to image

Closes #3591

See merge request !1868
2015-11-21 23:11:45 -05:00
Robert SpeicherandRobert Speicher 53c0b6213f Merge branch 'award_fix' into 'master'
Award Emoji: fix for merge requests

Closes #3597

See merge request !1865
2015-11-21 13:59:25 -05:00
Valery Sizov c279bd812e Fix for Emoji 2015-11-20 11:23:04 +02:00
Dmitriy ZaporozhetsandRobert Speicher 48e86ec610 Merge branch 'emoji_votes' into 'master'
Award Emoji

This it first iteration of award emoji feature.
We have plan to extend emoji picker by the next release.

For now, you can add award by clicking to the emoji picker or posting a regular comment with emoji like "👍" and any other. You can post not only emoji that listed in the emoji picker.

See merge request !1825
2015-11-19 19:50:58 -05:00
Robert SpeicherandRobert Speicher 463a3cfe09 Merge branch 'dirceu/gitlab-ce-new-merge-request-from-file-edit' into 'master'
Add option to create merge request when editing/creating a file

Replaces !1611 

Fixes #3059

See merge request !1820
2015-11-19 11:46:24 -05:00
Douwe MaanandRobert Speicher 371e8505f8 Merge branch 'ce-mirror-backport' into 'master'
Backport relevant changes from gitlab-org/gitlab-ee!51

To do:

- [x] Update gitlab-shell

See merge request !1822
2015-11-18 16:41:56 -05:00
Robert SpeicherandRobert Speicher ea5a10b065 Merge branch 'compare-first-commit' into 'master'
Correctly set comparison first commit when range includes a merge commit

Fixes #3207.

See merge request !1814
2015-11-17 13:52:09 -05:00
Robert SpeicherandRobert Speicher 8a1cafeb9d Merge branch 'james11/gitlab-ce-removable-group-owner' into 'master'
Prevent the last owner of a group from being able to delete themselves
by 'adding' themselves as a master

Replaces !1708.

Fixes #1111.

See merge request !1815
2015-11-17 13:24:15 -05:00
Robert Speicher c8e53d4467 Revert "Merge pull request #9820 from huacnlee/avoid-render-form-in-notes-list"
This reverts commit 63144cd062, reversing
changes made to 8ab5df9d87.
2015-11-16 13:08:08 -05:00
Dmitriy Zaporozhets 6c8dded20b Merge branch 'fix_trailing_title_space' of https://gitlab.com/dblessing/gitlab-ce 2015-11-16 10:40:49 +01:00
Kamil Trzcinski 6384c757b7 Expose CI enable option in project features
- Enable CI by default for all new projects
2015-11-13 10:52:50 +01:00
Minsik Yoonand윤민식 3d0efa8e0a Add ignore white space option in merge request diff
fix this issue(https://gitlab.com/gitlab-org/gitlab-ce/issues/1393).

Add ignore whitespace optoin to Commits Compare view
2015-11-13 16:53:53 +09:00
Dmitriy Zaporozhets 63144cd062 Merge pull request #9820 from huacnlee/avoid-render-form-in-notes-list
Avoid render edit_form in each notes.
2015-11-12 11:55:55 +01:00
Jason Lee 1974087114 Avoid render edit_form in each notes.
Use RJS to render edit note feature.

Before:

```
Rendered projects/notes/_note.html.haml (27.9ms)
Rendered projects/_zen.html.haml (0.3ms)
Rendered projects/notes/_hints.html.haml (0.7ms)
Rendered projects/_md_preview.html.haml (3.9ms)
Rendered projects/notes/_edit_form.html.haml (6.9ms)
Rendered projects/notes/_note.html.haml (17.7ms)
Rendered projects/_zen.html.haml (0.3ms)
Rendered projects/notes/_hints.html.haml (0.6ms)
Rendered projects/_md_preview.html.haml (3.4ms)
Rendered projects/notes/_edit_form.html.haml (7.0ms)
```

After:

```
Rendered projects/notes/_note.html.haml (13.8ms)
Rendered projects/notes/_note.html.haml (7.1ms)
Rendered projects/notes/_note.html.haml (9.5ms)
Rendered projects/notes/_note.html.haml (8.5ms)
```

This change reduce at least 6ms * N ('N' - number of notes).
2015-11-12 13:16:35 +08:00
Kamil Trzciński fb5c3c7021 Merge branch 'artifacts' into 'master'
Implement Build Artifacts

This implements #3028 

1. It stores artifacts in shared/artifacts,
1. It adds `artifacts` to `.gitlab-ci.yml`,
1. We use GitLab Workhorse to offload artifacts uploading,
1. To download artifacts it uses GitLab Workhorse X-Sendfile extension,
1. There's one "artifact" per-build. The new upload removes previous one and creates a new one,
1. Default max artifact size is set to 100MB - this can be changed in settings.

Missing things:
1. Support for `.gitlab-ci.yml`: `artifacts: true or git-ls-files` which will upload all non tracked files,
1. Artifacts passing between builds.

GitLab Workhorse changes: https://gitlab.com/gitlab-org/gitlab-workhorse/merge_requests/5
GitLab Runner changes: https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/merge_requests/46

Syntax:
```
artifacts:
  untracked: true # default: false
  paths: # default: empty
  - bin/files
```


See merge request !1584
2015-11-11 12:44:37 +00:00
Drew Blessing 752d528019 Fix trailing space issue with merge requests and issues. Fixes #2514 2015-11-10 15:41:49 -06:00
Dmitriy Zaporozhets 7181fdd23e Merge branch 'issue_3072_target_name' into 'master'
Display target branch on MR list when it is different from project's default

Fixes #3072

The screenshot below shows both previous and current UI state:

![branch-mr-both](/uploads/5c1f0519e42bae4655f3eee37edfc356/branch-mr-both.png)

First merge request has default branch as a target, second one has non default branch as target.

See merge request !1741
2015-11-10 12:28:45 +00:00
Kamil Trzcinski d0e3e823a2 Implement Build Artifacts
- Offloads uploading to GitLab Workhorse
- Use /authorize request for fast uploading
- Added backup recipes for artifacts
- Support download acceleration using X-Sendfile
2015-11-10 12:51:50 +01:00
Dmitriy Zaporozhets 354b69dde2 Merge remote-tracking branch 'origin/release-notes'
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-10 10:20:22 +01:00
Anton Baklanov 746e49fee9 Display target branch on MR list when it is different from project's default 2015-11-10 09:31:14 +02:00
Dmitriy Zaporozhets b7619dad52 Add missing param and title for tag
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-09 15:39:18 +01:00
Dmitriy Zaporozhets b67fdfff3c Refactor release code a bit
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-09 15:30:50 +01:00
Dmitriy Zaporozhets 900419c43c Improve UI for tags page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-05 17:08:47 +01:00
Kamil Trzcinski ba68facf8d CI details cleanup
- Add page titles to CI settings.
- Fix CI admin navigation.
- Remove duplicated scope.
- Use monospace font for commit sha.
- Add page title and header title to build page.
- Proper authorization for cancel/retry builds.
- Use gitlab pagination theme for builds and group members.
- Don't paginate builds widget on build page.
- Add badges to commit page Changes/Builds tabs.
- Add "Builds" to commit Builds tab page title.
- Add and use Ci::Build#retryable? method.
- Add CI::Build#retried? method.
- Allow all failed commit builds to be retried.
- Proper authorization for cancel/retry all builds.
- Remove unused param.
- Use time_ago_with_tooltip where appropriate.
- Tweak builds index text
- Remove duplication between builds/build and commit_statuses/commit_status.
- Use POST rather than GET for canceling and retrying builds.
- Remove redundant URL helpers.
- Add build ID to build page.
- Link branch name on build page.
- Move commit/:sha/ci to commit/:sha/builds.
2015-11-05 15:24:27 +01:00
Dmitriy Zaporozhets 26677fbe21 After tag is created - redirect to tag page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-05 14:07:55 +01:00
Dmitriy Zaporozhets 312cf11b61 Add release description to new tag form
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-05 14:03:48 +01:00
Dmitriy Zaporozhets 850bb21b12 Create show page for tag and render release notes there and on index page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-05 13:49:34 +01:00
Dmitriy Zaporozhets a4d75e3aec Add ability to edit and show release notes
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-05 12:15:25 +01:00
Dmitriy Zaporozhets ba67af79a9 More release related logic to separate resource
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-05 11:16:41 +01:00
Dmitriy Zaporozhets 33b8f00263 Add edit/update tag actions for future release notes
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-05 10:51:12 +01:00
Ben FordandDouwe Maan 3be9d2c422 Add ability to create directories in the editor
Simply type a name with a `/` directory separator and new directories
will be created. This does not do the fancy UI work that github.com
does, but it will get the job done.

I could not find tests for file creation, so I didn't add a test for
this slight behaviour modification. I did test directory traversals
though, using both absolute paths like `/tmp/foo.txt` and relative paths
like `../../foo.txt`. Neither case escaped the repository, though
attempting to traverse with a relative path resulted in a 500 error that
did not affect application stability upon reload.
2015-10-29 15:49:07 +01:00
Kamil Trzcinski 6db014987d Fix specific runner visibility 2015-10-26 11:23:11 +01:00
Robert Speicher 17c60173f6 Merge branch 'fix-ci-regressions' into 'master'
Fix CI regressions

This MR fixes a couple of small CI regressions
- Allow developer to manage builds
- On CI Admin page show only projects that are present in GitLab
- On Runner CI Admin page show only projects that are present in GitLab
- Refresh build log only when status changes
- Show the oldest builds on top when viewing Builds - it most cases it shows running builds on top
- Fix Lint rendering
- Fix number of other builds in build widget

Fixes #3164

Fixes #3161 

Fixes gitlab-org/gitlab-ci#343

See merge request !1679
2015-10-23 14:06:34 +00:00
Dmitriy Zaporozhets 3bb39f0e49 Merge branch 'comments_fix' into 'master'
Fix: Inability to reply to code comments in the MR view, if the MR comes from a fork

https://dev.gitlab.org/gitlab/gitlabhq/issues/2535

See merge request !1675
2015-10-23 09:46:18 +00:00
Kamil Trzcinski 3adfee1c87 Allow developer to manage builds 2015-10-23 11:45:45 +02:00
Kamil Trzcinski 127836dd54 Fix small CI UI regressions 2015-10-23 11:45:45 +02:00
Valery Sizov 95df86638d Fix: Inability to reply to code comments in the MR view, if the MR comes from a fork 2015-10-22 18:38:00 +02:00
Dmitriy Zaporozhets 01315cfe76 Merge branch 'hanloong/gitlab-ce-add-dates-snippets-show' into 'master'
Update style of snippets pages

![Screen_Shot_2015-10-18_at_13.04.13](/uploads/95d58b64fa81aa4e75568d2d7b4a6b08/Screen_Shot_2015-10-18_at_13.04.13.png)

![Screen_Shot_2015-10-21_at_11.11.10](/uploads/106371d718a07a9ccdad9148812211fd/Screen_Shot_2015-10-21_at_11.11.10.png)

Replaces !1567.

Fixes #1767 and #2538.


See merge request !1637
2015-10-22 13:34:34 +00:00
Kamil Trzcinski 40934ae39b Fix 500 when editing CI services 2015-10-22 11:14:15 +02:00
Douwe Maan d37cf64237 Merge branch 'master' into hanloong/gitlab-ce-add-dates-snippets-show 2015-10-21 10:24:06 +02:00
Dmitriy Zaporozhets f16bfa401f Merge branch 'merge-request-deleted-file' into 'master'
Correctly find last known blob for file deleted in MR.

Fixes #3092.

When building a new MR, `@merge_request.commits.last` would fail because this delegates to `merge_request_diff` which is still `nil` at that point. I fixed that, and changed some of the logic because showing deleted blob contents didn't previously work for the Compare page, and the UI would show the wrong commit sha for "View File @...".

See merge request !1647
2015-10-20 16:24:01 +00:00
Stan Hu 9bfc531ec6 Redirect to a default path if HTTP_REFERER is not set
Safari 9.0 does not yet honor the HTML5 `origin-when-cross-origin` mode,
and it's possible load balancers/proxies strip the HTTP_REFERER from
the request header. In these cases, default to some default path.

Closes #3122

Closes https://github.com/gitlabhq/gitlabhq/issues/9731
2015-10-20 07:45:48 -07:00
Douwe Maan 8710739e4e Correctly find last known blob for file deleted in MR. 2015-10-20 14:24:02 +02:00
Yorick Peterse 4ff75e3179 Improve performance of sorting milestone issues
This cuts down the time it takes to sort issues of a milestone by about
10x. In the previous setup the code would run a SQL query for every
issue that had to be sorted. The new setup instead runs a single SQL
query to update all the given issues at once.

The attached benchmark used to run at around 60 iterations per second,
using the new setup this hovers around 600 iterations per second. Timing
wise a request to update a milestone with 40-something issues would take
about 760 ms, in the new setup this only takes about 130 ms.

Fixes #3066
2015-10-19 11:37:14 +02:00
Douwe Maan 946f00ed7f Update style of snippets pages 2015-10-18 13:03:26 +02:00
Zeger-Jan van de Weg 94a788f66d Only accept open issues and merge requests 2015-10-16 09:59:32 +02:00