Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-03-18Merge branch 'ssrf' into 'security' Rubén Dávila
nil check for url_blocker? See merge request !2076
2017-03-18Merge branch 'ssrf' into 'security'Douwe Maan
Protect server against SSRF in project import URLs See merge request !2068 Conflicts: spec/models/project_spec.rb
2017-02-14Merge branch 'fix-github-import-MR-wrong-project' into 'security' Robert Speicher
Fix labels being applied to wrong merge requests on GitHub import See https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2064
2017-02-14Merge branch 'fix-rdoc-xss' into 'security' Robert Speicher
Fix XSS in rdoc and other markups See https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2058
2017-02-14Merge branch 'asciidoctor-xss-patch' into 'security' Robert Speicher
Add sanitization filter to asciidocs output to prevent XSS See https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2057
2017-01-09Merge branch '26051-fix-missing-endpoint-route-method' into 'master' Rémy Coutable
Don't instrument 405 Grape calls Closes #26051 See merge request !8445
2017-01-06Merge branch 'set_ldap_config_attributes_defaults' into 'master' Rémy Coutable
LDAP attributes needs default values See merge request !8465
2017-01-05Merge branch 'fix/group-path-rename-error' into 'master' Douwe Maan
Fix error 500 renaming group. Also added specs and changelog. Closes #17922 and #23223 See merge request !8201
2017-01-05Merge branch 'fix/cross-project-ref-path' into 'master' Sean McGivern
Fix cross-project references copy to include the project reference Closes #25890 See merge request !8232
2017-01-05Merge branch 'ldap_person_attributes' into 'master' Robert Speicher
Gitlab::LDAP::Person uses LDAP attributes configuration Closes #26290 See merge request !8418
2016-12-27Merge branch ↵Douwe Maan
'25931-gitlab-merge-request-view-crash-when-commiting-a-js-sourcemap-file' into 'master' Resolve "Gitlab merge request view crash when commiting a js sourcemap file" Closes #25931 See merge request !8310
2016-12-27Merge branch 'auto-deploy-with-space' into 'master' Sean McGivern
Rename "autodeploy" to "auto deploy" Closes #25999 See merge request !8289
2016-12-23Merge branch 'zj-fix-issue-search-chat-command' into 'master' Rémy Coutable
Fix errorcode 500 on slash commands Closes #26013 See merge request !8285
2016-12-22Merge branch 'adam-auto-deploy' into 'master' Kamil Trzciński
Auto deploy Closes #23580 See merge request !8135
2016-12-21Merge branch '25908-fix-grape-after-update' into 'master' Yorick Peterse
Use Grape's new Route methods See merge request !8223
2016-12-21Merge branch 'fix/import-labels-error' into 'master' Douwe Maan
Fix Import/Export labels error Closes #24257 See merge request !8212
2016-12-21Merge branch 'fix/import-export-build-token' into 'master' Grzegorz Bizon
Fix duplicated build token problem importing projects Reset token so duplicated builds do not thrown an error on import - [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if it does - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23475 See merge request !8171
2016-12-21Merge branch 'multipart-uploaded-file' into 'master' Rémy Coutable
Inject ::UploadedFile from Multipart middleware Closes #25888 See merge request !8215
2016-12-21Merge branch 'fix/detailed-status-groups' into 'master' Lin Jen-Shin (godfat)
Improve icons and style for manual build status ## What does this MR do? This MR changes the CSS class for manual build status badge to make it a little more different than skipped build status badge. It makes it darker. ## Screenshots ![Screen_Shot_2016-12-17_at_13.37.58](/uploads/9628f0e84fdaad82d8833f546f0192a6/Screen_Shot_2016-12-17_at_13.37.58.png)![Screen_Shot_2016-12-17_at_13.31.48](/uploads/fe8e27df0274b9f9ae840110593a298a/Screen_Shot_2016-12-17_at_13.31.48.png) See merge request !8102
2016-12-21Merge branch '22864-kubernetes-deploy-with-terminal' into 'master' Kamil Trzciński
Add online terminal support for Kubernetes ## What does this MR do? Gives terminal access to kubernetes-deployed environments via the deployment service ## Are there points in the code the reviewer needs to double check? ## Why was this MR needed? Part of idea to production ## Screenshots (if relevant) ### `/root/reviewing/environments` ![Screen_Shot_2016-12-15_at_19.10.40](/uploads/bd2c54c07b6c85dec3328a20cd185b64/Screen_Shot_2016-12-15_at_19.10.40.png) ### `/root/reviewing/environments/10013` ![Screen_Shot_2016-12-19_at_12.52.39](/uploads/db4e4e06cda88437e8727433d65898b9/Screen_Shot_2016-12-19_at_12.52.39.png) ### `/root/reviewing/enviroments/10013/terminal` ![Screen_Shot_2016-12-15_at_02.35.52](/uploads/1bb77b7e2de2c657ae3bda62dc4f0970/Screen_Shot_2016-12-15_at_02.35.52.png) ## Does this MR meet the acceptance criteria? - [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - Tests - [X] Added for this feature/bug - [x] All builds are passing - [X] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [X] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if it does - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? * Closes #22864 #22958 * Alternative to, and somewhat based on, !6770 * Depends on https://gitlab.com/gitlab-org/gitlab-workhorse/merge_requests/83 See merge request !7690
2016-12-21Merge branch 'fix-yaml-variables' into 'master' Grzegorz Bizon
Convert CI YAML variables keys into strings So that this would be more consistent with the other variables, which all of them are string based. Closes #25554 See merge request !8088
2016-12-21Merge branch 'dockerfile-templates' into 'master' Rémy Coutable
Allow to use Dockerfile templates See merge request !7247
2016-12-21Merge branch 'zj-kamil-slack-slash-commands' into 'master'Grzegorz Bizon
Slack slash commands Implement Slack Slash Commands by utilizing generalized Mattermost presenter to fulfill Slack requirements. We want to expose Slack Slash Commands as a first-class service. Supersedes !8007 Closes #22182 See merge request !8126
2016-12-21Merge branch '22348-gitea-importer' into 'master' Rémy Coutable
It adds a brand new importer for Gitea! This is a continuation of !6945 started by @bkc. Gitea aims to be 100% GitHub-compatible but there's a few differences: - Gitea is not an OAuth provider (yet): https://github.com/go-gitea/gitea/issues/27 - This means we cannot map Gitea users given an assignee ID => assignees are not set on imported issues and merge requests - No releases API for now: https://github.com/go-gitea/gitea/issues/330 - API version is `v1` (GitHub is `v3`) - The IID field for milestones is `id` compared to `number` in GitHub. - Issues, PRs, milestones, labels don't have a `url` field (the importer now fallback to `''` in that case) **Known issues:** - Comments are not imported because comments JSON always have a blank `html_url`/`issue_url`/`pull_request_url`, so the IID cannot be extracted and the issuable cannot be found... :( This is tracked in https://github.com/go-gitea/gitea/issues/401, and solved by https://github.com/gogits/gogs/pull/3624 but this needs to be submitted / merged in Gitea. This is noted in the documentation. ## Are there points in the code the reviewer needs to double check? 1. I've made `Import::GiteaController` inherit from `Import::GithubController` since both controllers should be identical in the long-term and their current differences are small. 1. I've added a base `IssuableFormatter` class from which `IssueFormatter` & `PullRequestFormatter` inherit 1. I've added shared examples for GitHub/Gitea importer classes 1. I've made `Gitlab::ImportSources` more robust and tested! :christmas_tree: 1. I've added routing specs for import routes! :christmas_tree: Closes #22348 See merge request !8116
2016-12-21Merge branch 'fix/import-export-ee-services' into 'master' Rémy Coutable
Fix missing service error importing from EE to CE Ignores services that are missing in the new instance (EE or even a customised instance), to avoid breaking the import. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23782 See merge request !8144
2016-12-21Merge branch 'fix/import-export-mr-error' into 'master' Rémy Coutable
Fix import/export merge requests error When MWBS is set and the MR exported/imported an error gets thrown. We should ignore this so it can succeed as the merge user may no longer exist in the target instance. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/24009 and https://gitlab.com/gitlab-com/support-forum/issues/1345 See merge request !8134
2016-12-21Merge branch 'bb-wiki-import' into 'master' Douglas Barbosa Alexandre
Add Wiki import to BB importer ## What does this MR do? Adds wiki importing - [ ] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [ ] API support added - Tests - [ ] Added for this feature/bug - [ ] All builds are passing - [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ ] Branch has no merge conflicts with `master` (if it does - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/25819 See merge request !8180
2016-12-20Merge branch '25848-fix-git-rev-list-env-parsing' into 'master' Sean McGivern
Reject blank environment variables in Gitlab::Git::RevList Closes #25848 See merge request !8189
2016-12-19Merge branch '25301-git-2.11-force-push-bug' into 'master' Douglas Barbosa Alexandre
Accept environment variables from the `pre-receive` script ## Summary 1. Starting version 2.11, git changed the way the pre-receive flow works. - Previously, the new potential objects would be added to the main repo. If the pre-receive passes, the new objects stay in the repo but are linked up. If the pre-receive fails, the new objects stay orphaned in the repo, and are cleaned up during the next `git gc`. - In 2.11, the new potential objects are added to a temporary "alternate object directory", that git creates for this purpose. If the pre-receive passes, the objects from the alternate object directory are migrated to the main repo. If the pre-receive fails the alternate object directory is simply deleted. 2. In our workflow, the pre-recieve script (in `gitlab-shell`) calls the `/allowed` endpoint, which calls out directly to git to perform various checks. These direct calls to git do _not_ have the necessary environment variables set which allow access to the "alternate object directory" (explained above). Therefore these calls to git are not able to access any of the new potential objects to be added during this push. 3. We fix this by accepting the relevant environment variables (`GIT_ALTERNATE_OBJECT_DIRECTORIES`, `GIT_OBJECT_DIRECTORY`, and `GIT_QUARANTINE_PATH`) on the `/allowed` endpoint, and then include these environment variables while calling out to git. 4. This commit includes these environment variables while making the "force push" check. ## Issue Numbers - Closes #25301 (assuming the corresponding `gitlab-shell` MR has been merged in first) - Corresponding `gitlab-shell` MR: gitlab-org/gitlab-shell!112 - Corresponding EE MR: gitlab-org/gitlab-ee!964 ## Tasks - [#25301/!7967/!112] Git version 2.11.0 - Can't push to protected branch as master or developer - [x] Investigate - [x] Implementation - [x] `force_push.rb` should use the relevant environment variables - [x] Any other instances of `/allowed` calling out to git directly? - [x] Verify that the fix works over SSH as well - [x] Can we trim the number of env variables? Do we need all 3? - [x] Whitelist variables. Server shouldn't pass through _any_ env variable passed in - [x] Any security implications? - [x] Check for force push return code - [x] Shouldn't be able to opt-out from the force push check by passing an env variable - [x] Tests - [x] CE - [x] Added - [x] Passing - [x] Shell - [x] Added - [x] Passing - [x] Meta - [x] CHANGELOG entry created - [x] Branch has no merge conflicts with `master` - [x] Squashed related commits together - [x] EE merge request - [x] Review - [x] Endboss - [ ] Follow-up - [x] Make sure EE is working as expected - [x] [CE] Gitlab changes without gitlab-shell changes shouldn't raise any exceptions - [x] [CE] Gitlab-shell changes without gitlab changes shouldn't raise any exceptions - [x] [EE] Gitlab changes without gitlab-shell changes shouldn't raise any exceptions - [x] [EE] Gitlab-shell changes without gitlab changes shouldn't raise any exceptions - [ ] Wait for merge - [ ] CE - [ ] EE - [x] Shell See merge request !7967
2016-12-17Fix import issues methodDouglas Barbosa Alexandre
2016-12-16Merge remote-tracking branch 'origin/master' into bitbucket-oauth2Douglas Barbosa Alexandre
2016-12-16Fix rubucop offensesDouglas Barbosa Alexandre
2016-12-16BB importer: Adressed more review commentsValery Sizov
2016-12-16BB importer: address review commentValery Sizov
2016-12-16BB importer: Milestone importerValery Sizov
2016-12-16Rename the `token_has_scope?` method.Timothy Andrew
`valid_api_token?` is a better name. Scopes are just (potentially) one facet of a "valid" token.
2016-12-16Convert AccessTokenValidationService into a class.Timothy Andrew
- Previously, AccessTokenValidationService was a module, and all its public methods accepted a token. It makes sense to convert it to a class which accepts a token during initialization. - Also rename the `sufficient_scope?` method to `include_any_scope?` - Based on feedback from @rymai
2016-12-16Refactor access token validation in `Gitlab::Auth`Timothy Andrew
- Based on @dbalexandre's review - Extract token validity conditions into two separate methods, for personal access tokens and OAuth tokens.
2016-12-16Implement minor changes from @dbalexandre's review.Timothy Andrew
- Mainly whitespace changes. - Require the migration adding the `scope` column to the `personal_access_tokens` table to have downtime, since API calls will fail if the new code is in place, but the migration hasn't run. - Minor refactoring - load `@scopes` in a `before_action`, since we're doing it in three different places.
2016-12-16Validate access token scopes in `Gitlab::Auth`Timothy Andrew
- This module is used for git-over-http, as well as JWT. - The only valid scope here is `api`, currently.
2016-12-16 Calls to the API are checked for scope.Timothy Andrew
- Move the `Oauth2::AccessTokenValidationService` class to `AccessTokenValidationService`, since it is now being used for personal access token validation as well. - Each API endpoint declares the scopes it accepts (if any). Currently, the top level API module declares the `api` scope, and the `Users` API module declares the `read_user` scope (for GET requests). - Move the `find_user_by_private_token` from the API `Helpers` module to the `APIGuard` module, to avoid littering `Helpers` with more auth-related methods to support `find_user_by_private_token`
2016-12-16Merge branch 'katex-math-fixup' into 'master' Sean McGivern
Don't open Asciidoc module twice See merge request !8119
2016-12-16Merge branch ↵Kamil Trzciński
'25144-gitlab-ce-mattermost-slash-command-for-issue-create-needs-better-documentation' into 'master' Resolve "gitlab-ce mattermost slash command for issue create needs better documentation" ## What does this MR do? Updates the documentation and the <kbd>help</kbd> command to be clearer, having the keys used to add a newline in chat clients (both Mattermost and Slack). ## Are there points in the code the reviewer needs to double check? * Are the available commands (via <kbd>help</kbd>) being formatted as `<code>` ? ## Why was this MR needed? `\n` represents a new line character and doesn't communicate how the user should input the command. Also, to be correct, the documentation should use `<kbd>` instead of `<code>` for user input ([see HTML5 specification](https://www.w3.org/TR/html5/text-level-semantics.html#the-kbd-element)) ## Screenshots (if relevant) | Mattermost | Docs | | --- | --- | | ![image](/uploads/539526a14bfd551b7e732dd96c5b7581/image.png) | ![image](/uploads/e3eb099f86c5a32ce3b8954e72c29848/image.png) | ## Does this MR meet the acceptance criteria? - [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - Tests - [ ] All builds are passing ## What are the relevant issue numbers? Closes #25144 See merge request !7850
2016-12-15Merge branch 'show-commit-status-from-latest-pipeline' into 'master' Grzegorz Bizon
Show commit status from latest pipeline Show commit status from latest pipeline rather than compound status from all pipelines. Closes #20560 See merge request !7333
2016-12-15Don't open Asciidoc module twiceMunken
2016-12-15Merge branch '22864-add-clean-environment-name' into 'master' Kamil Trzciński
Add a slug to environments ## What does this MR do? Adds a `slug` field to the `environments` table, populating existing rows and ensuring that new rows will get an entry. Cleaning examples: * `review/foo` => `review-foo-5gghdf` * `review-foo` => `review-foo` * `1-foo` => `env-1-foo-e2hx12` * `production` => `production` * `Production` => `production-f8ddlz` ## Are there points in the code the reviewer needs to double check? This migration requires downtime. I don't see a way to avoid it. ## Why was this MR needed? External services often have more restrictive rules on naming than those enforced for `environments.name`. In particular, forward slashes and names longer than 24 characters causes problems on OpenShift. `slug` is designed to be an acceptable alternative to `name` in these situations. Since forward slashes are a documented part of environment names, to set environment types, we need an envionmnent slug, not just a slug for the branch name. ## Does this MR meet the acceptance criteria? - [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [X] API support added - Tests - [X] Added for this feature/bug - [x] All builds are passing - [X] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [X] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [X] Branch has no merge conflicts with `master` (if it does - rebase it please) - [X] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? Part of #22864 See merge request !7983
2016-12-15Merge branch 'jej-note-search-uses-finder' into 'security' Douwe Maan
Fix missing Note access checks in by moving Note#search to updated NoteFinder Split from !2024 to partially solve https://gitlab.com/gitlab-org/gitlab-ce/issues/23867 ## Which fixes are in this MR? :warning: - Potentially untested :bomb: - No test coverage :traffic_light: - Test coverage of some sort exists (a test failed when error raised) :vertical_traffic_light: - Test coverage of return value (a test failed when nil used) :white_check_mark: - Permissions check tested ### Note lookup without access check - [x] :white_check_mark: app/finders/notes_finder.rb:13 :download_code check - [x] :white_check_mark: app/finders/notes_finder.rb:19 `SnippetsFinder` - [x] :white_check_mark: app/models/note.rb:121 [`Issue#visible_to_user`] - [x] :white_check_mark: lib/gitlab/project_search_results.rb:113 - This is the only use of `app/models/note.rb:121` above, but importantly has no access checks at all. This means it leaks MR comments and snippets when those features are `team-only` in addition to the issue comments which would be fixed by `app/models/note.rb:121`. - It is only called from SearchController where `can?(current_user, :download_code, @project)` is checked, so commit comments are not leaked. ### Previous discussions - [x] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#b915c5267a63628b0bafd23d37792ae73ceae272_13_13 `: download_code` check on commit - [x] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#b915c5267a63628b0bafd23d37792ae73ceae272_19_19 `SnippetsFinder` should be used - `SnippetsFinder` should check if the snippets feature is enabled -> https://gitlab.com/gitlab-org/gitlab-ce/issues/25223 ### Acceptance criteria met? - [x] Tests added for new code - [x] TODO comments removed - [x] Squashed and removed skipped tests - [x] Changelog entry - [ ] State Gitlab versions affected and issue severity in description - [ ] Create technical debt issue for NotesFinder. - Either split into `NotesFinder::ForTarget` and `NotesFinder::Search` or consider object per notable type such as `NotesFinder::OnIssue`. For the first option could create `NotesFinder::Base` which is either inherited from or which can be included in the other two. - Avoid case statement anti-pattern in this finder with use of `NotesFinder::OnCommit` etc. Consider something on the finder for this? `Model.finder(user, project)` - Move `inc_author` to the controller, and implement `related_notes` to replace `non_diff_notes`/`mr_and_commit_notes` See merge request !2035
2016-12-15Merge branch 'katex-math' into 'master' Sean McGivern
Render math in Asciidoc and Markdown with KaTeX using code blocks Closes #13690 and #13180 See merge request !8003
2016-12-15Add an environment slugNick Thomas
2016-12-15Rename `issue create` slash command to `issue new`Pedro Moreira da Silva