Commit Graph

458 Commits

Author SHA1 Message Date
Robert Speicher a2c767b9f8
Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq 2019-06-03 10:04:57 -07:00
Robert Speicher 2b13462ac4 Merge branch 'security-58856-persistent-xss-in-note-objects' into 'master'
Persistent XSS in note objects CE

See merge request gitlab/gitlabhq!3075
2019-06-03 17:01:10 +00:00
Liam McAndrew 5ddb32f382 Fix order dependency with user params during imports 2019-05-28 10:31:51 +00:00
James Lopez 30d915110f Fix issue importing members with owner access 2019-05-23 13:10:38 +00:00
Stan Hu 5c8cd42bbd Fix invalid visibility string comparison in project import
This resolves an "ArgumentError: comparison of String with 0 failed"
issue where the visibility_level is stored as a string in the project
import data because the value comes directly from the Web form. This
problem happened upon creating a project from a template or restoring a
project.

We now cast the value to an integer to guard against these kinds of
failures.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/61692
2019-05-22 11:32:23 -07:00
Heinrich Lee Yu e938d241ea Include type to notes import / export 2019-05-17 16:45:40 +08:00
charlieablett 0aff6238f7 Change `prohibited_key` to use regexes 2019-05-01 12:15:29 +12:00
charlieablett 4b46b53082 Add `html` to sensitive words 2019-05-01 10:38:41 +12:00
charlieablett 1cbdc5326c Refactor `attribute_cleaner` for readability 2019-04-30 11:25:09 +12:00
charlieablett b240012c4f Further clarify `attribute_cleaner` 2019-04-29 21:31:16 +12:00
Reuben Pereira 4376167a04 Add ProjectMetricsDashboardSetting model and table
This new table will be used to store the external_dashboard_url which
allows users to add a link to their external dashboards (ex Grafana)
to the Metrics dashboard.
2019-04-26 17:23:26 +00:00
charlieablett 4bd331a568 Tighten up prohibited_key method 2019-04-26 09:40:00 +12:00
Charlie Ablett 8eae788fd4 Use English instead of Latin 2019-04-25 09:39:53 +12:00
Francisco Javier López 7d85448b58 Fix bug when project export to remote url fails 2019-04-24 15:34:06 +00:00
charlieablett 7e6befc05d Add disallowed fields to AttributeCleaner 2019-04-24 14:31:20 +12:00
charlieablett 0f2dff6264 Exclude fields from note import 2019-04-23 20:57:24 +12:00
Thong Kuah d119d3d1b2 Align UrlValidator to validate_url gem implementation.
Renamed UrlValidator to AddressableUrlValidator to avoid 'url:' naming collision with ActiveModel::Validations::UrlValidator in 'validates' statement.
Make use of the options attribute of the parent class ActiveModel::EachValidator.
Add more options: allow_nil, allow_blank, message.
Renamed 'protocols' option to 'schemes' to match the option naming from UrlValidator.
2019-04-11 06:29:07 +00:00
John Jarvis 69b65a6b74 Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into jarv/dev-to-gitlab-2019-04-02 2019-04-02 10:12:32 +02:00
Oswaldo Ferreira 03e0604d5d Prepare suggestion implementation for multi-line
Adds the groundwork needed in order to persist multi-line suggestions,
while providing the parsing strategy which will be reused for the
**Preview** as well.
2019-03-27 12:26:53 -03:00
Igor Drozdov 732f892db3 Return cached languages if they've been detected before 2019-03-20 20:33:49 +03:00
Pirate Praveen c122014fd3
Update acts-as-taggable-on 5.0 -> 6.0
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-03-18 12:08:48 +01:00
Andrew Newdigate 3288e1a874 Adds the Rubocop ReturnNil cop
This style change enforces `return if ...` instead of
`return nil if ...` to save maintainers a few minor review points
2019-03-06 17:51:56 +02:00
Francisco Javier López ebf16ada85 Arbitrary file read via MergeRequestDiff 2019-03-04 18:36:34 +00:00
James Lopez c643042a49
Fix project import error on releases 2019-02-22 15:07:53 +01:00
Lin Jen-Shin ab06c9b654 Merge branch 'remove-ignored-columns' into 'master'
Remove two ignored columns

See merge request gitlab-org/gitlab-ce!25250
2019-02-15 12:47:29 +00:00
Nick Thomas 80a7aa9905
Remove further instances of st_diffs 2019-02-14 16:21:24 +00:00
James Lopez 401a3bca40
Fix import_jid error on project import 2019-02-14 09:29:42 +01:00
Nick Thomas f9e41d0d85
Allow MR diffs to be placed into an object store 2019-02-05 14:12:48 +00:00
Reuben Pereira 2079444091 DB and model changes for Sentry project selection dropdown 2019-02-04 12:12:24 +00:00
James Lopez f78545af98
Fix tree restorer visibility level 2019-01-31 16:52:49 +01:00
James Lopez 57f082d969
Fix path disclosure on Project Import 2019-01-31 16:51:16 +01:00
Douwe Maan cfa7108210 Merge branch '49231-import-issues-csv' into 'master'
Import issues from CSV

Closes #49231

See merge request gitlab-org/gitlab-ce!23532
2019-01-07 23:15:53 +00:00
Reuben Pereira f40b5860d7 Add table and model for error tracking settings 2019-01-07 17:55:21 +00:00
Heinrich Lee Yu 63e9969ca3 Refactor upload service to return uploader
Also changes old calls to the service
2019-01-07 11:16:58 +08:00
Kamil Trzciński 0103d5be96 Add config_options|variables to BuildMetadata
These are data columns that store runtime configuration
of build needed to execute it on runner and within pipeline.

The definition of this data is that once used, and when no longer
needed (due to retry capability) they can be freely removed.

They use `jsonb` on PostgreSQL, and `text` on MySQL (due to lacking
support for json datatype on old enough version).
2019-01-04 16:38:17 +01:00
Shinya Maeda 66755c9ed5 Support CURD operation for release asset links
- Add Releases::Links model
- Expose it in release API
- Add integration tests
2019-01-04 22:17:02 +09:00
Stan Hu 2341692c49 Drop Webhooks from project import/export config
Webhook URLs were recently encrypted in the database via
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21645, and as a
result they are no longer exported. When an exported project with
Webhooks is imported, the project import service will fail with
`URI::InvalidURIError: bad URI(is not URI?)` due to a blank URL.
We avoid this by disabling the export/import of Webhooks in
the first place.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53513
2019-01-03 06:22:14 -08:00
James Lopez 43cc0d5a4a
Fix persistent symlink in project import
- Fix permissions after untar is done
- Refactor command line util
2018-12-17 16:14:35 +01:00
Alessio Caiazza b782ba1113
Add name, author and sha to releases
This commit adds a name to each release, defaulting it to tag name,
keeps track of the SHA when a new release is created and tracks the
current user as release author.
2018-12-13 12:15:21 +01:00
Rémy Coutable eadd53b969 Merge branch 'sh-remove-gitlab-shell-include' into 'master'
Remove unnecessary includes of ShellAdapter

See merge request gitlab-org/gitlab-ce!23607
2018-12-10 16:22:53 +00:00
Kamil Trzciński a910c09bbc Encrypt CI/CD builds tokens
Brings back 1e8f1de0 reverted in !23644

Closes #52342

See merge request gitlab-org/gitlab-ce!23436
2018-12-07 10:42:47 +01:00
Robert Speicher 950b9130ad
Revert "Merge branch 'fix/gb/encrypt-ci-build-token' into 'master'"
This reverts commit 1e8f1de034, reversing
changes made to 62d971129d.
2018-12-06 18:53:24 -06:00
Nick Thomas 9395d198f9
Use BFG object maps to clean projects 2018-12-06 18:58:00 +00:00
Kamil Trzciński 1e8f1de034 Merge branch 'fix/gb/encrypt-ci-build-token' into 'master'
Encrypt CI/CD builds tokens

Closes #52342

See merge request gitlab-org/gitlab-ce!23436
2018-12-06 09:42:18 +00:00
Stan Hu e96fd232a6 Remove unnecessary includes of ShellAdapter
Determined by running the script:

```
included = `git grep --name-only ShellAdapter`.chomp.split("\n")
used = `git grep --name-only gitlab_shell`.chomp.split("\n")
included - used
```
2018-12-05 23:19:27 -08:00
Francisco Javier López a6778fc647 Rename project's pipelines relation 2018-12-05 14:39:15 +00:00
Grzegorz Bizon ca2c5ddba7 Exclude encrypted build token from import/export and retries 2018-12-05 10:53:48 +01:00
Grzegorz Bizon 0b8a2779e7 Merge branch 'master' into fix/gb/encrypt-runners-tokens
* master: (243 commits)

Conflicts:
	db/schema.rb
	lib/gitlab/import_export/import_export.yml
2018-11-28 13:14:04 +01:00
Tiago Botelho 4bd8a427d4
Removes all the irrelevant import related code and columns
Clears the import related columns and code from the Project
model over to the ProjectImportState model
2018-11-27 12:58:13 +00:00
Grzegorz Bizon 88e2b6ea9f Merge remote-tracking branch 'dev/master' into security-encrypt-runners-tokens
* dev/master: (302 commits)

Conflicts:
	db/schema.rb
	lib/gitlab/import_export/import_export.yml
2018-11-21 11:02:31 +01:00