Commit Graph

42 Commits

Author SHA1 Message Date
GitLab Bot 9dde272671 Add latest changes from gitlab-org/gitlab@master 2020-08-11 15:10:08 +00:00
GitLab Bot c59765a50a Add latest changes from gitlab-org/gitlab@master 2020-06-24 18:09:03 +00:00
GitLab Bot b5249f2d99 Add latest changes from gitlab-org/gitlab@master 2020-05-25 12:08:23 +00:00
GitLab Bot 033c2c5acd Add latest changes from gitlab-org/gitlab@master 2020-04-24 00:09:28 +00:00
GitLab Bot b6847c621f Add latest changes from gitlab-org/gitlab@master 2020-04-03 18:10:03 +00:00
GitLab Bot 39fa7d1eeb Add latest changes from gitlab-org/gitlab@master 2020-03-27 12:07:43 +00:00
GitLab Bot dc003cd08b Add latest changes from gitlab-org/gitlab@master 2020-03-26 18:08:03 +00:00
GitLab Bot 7cc6872401 Add latest changes from gitlab-org/gitlab@master 2020-01-29 12:09:08 +00:00
GitLab Bot 3f9e1b2611 Add latest changes from gitlab-org/gitlab@master 2020-01-23 15:08:46 +00:00
GitLab Bot 784fae4b9d Add latest changes from gitlab-org/gitlab@master 2019-12-12 12:07:33 +00:00
GitLab Bot c1f270b8ba Add latest changes from gitlab-org/gitlab@master 2019-11-18 03:06:28 +00:00
GitLab Bot 25989ab7ef Add latest changes from gitlab-org/gitlab@master 2019-10-18 11:11:44 +00:00
Stan Hu 29ce13e999 Fix moving issues API failing when text includes commit URLs
When a issue is moved from one project to another, all associated
Markdown text is rewritten in the context of the new project. If the
note contained a link to a commit URL, `CommitRewriter#rewrite` would
fail because `Commit#link_reference_pattern` would match `nil` `commit`
values in the HTML generated from the Markdown. These `nil` values were
passed along to `Project#commits_by` because `Commit#reference_valid?`
was always returning `true`.

To prevent this issue from happening, we tighten up the check for
`Commit#reference_valid?` to look for valid SHA values.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/66666
2019-08-28 00:18:33 -07:00
Felipe Artur 831ceea924 Prevent rewritting plain links as embedded
Prevents rewritting plain image/video links as embedded when moving
issues.
2019-08-07 15:39:48 -03:00
Stan Hu 1181cf336f Fix minor spec review comments in uploader specs 2018-07-03 09:57:15 -07:00
Micaël Bergeron 91c9c4b728 fix an issue with local files 2018-07-03 09:57:15 -07:00
Micaël Bergeron cebdd267e6 add support for file copy on object storage 2018-07-03 09:57:15 -07:00
Stan Hu e61f66b3d1 When moving issues, don't attempt to move files in object storage
Closes #48505
2018-07-03 09:57:15 -07:00
Nick Thomas 6b0c6e69e1
Use hashed storage in the specs 2018-02-07 13:40:46 +00:00
Micaël Bergeron 2057a6acde port of 594e6a0a625^..f74c90f68c6 2018-02-01 12:14:46 -05:00
blackst0ne 27c95364b5 Replace '.team << [user, role]' with 'add_role(user)' in specs 2017-12-22 19:18:28 +11:00
Grzegorz Bizon b49bd4d3bb Fix rewriting issue references with group milestones 2017-09-20 09:55:54 +00:00
Robert Speicher 72a7b30c9f Change all `:empty_project` to `:project` 2017-08-02 17:47:31 -04:00
Gabriel Mazetto abb878326c Rename many path_with_namespace -> full_path 2017-08-01 07:26:58 +02:00
Robert Speicher a6ec5121f0 Correct RSpec/SingleLineHook cop offenses 2017-06-14 13:18:56 -05:00
Robert Speicher 80a6d2fda2 Use `:empty_project` where possible throughout spec/lib 2017-01-25 12:25:42 -05:00
Rydkin Maxim 170efaaba2 Enable Style/MultilineOperationIndentation in Rubocop, fixes #25741 2016-12-16 21:37:22 +03:00
Oswaldo Ferreira f272ee6eba Add shorthand support to gitlab markdown references 2016-12-02 19:18:17 -02:00
Douwe Maan bf061d0aff
Merge branch 'issue_23548_dev' into 'master'
disable markdown in comments when referencing disabled features

fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23548

This MR prevents the following references when tool is disabled:

- issues
- snippets
- commits - when repo is disabled
- commit range - when repo is disabled
- milestones

This MR does not prevent references to repository files, since they are just markdown links and don't leak
information.

See merge request !2011

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-09 12:25:17 +01:00
Douglas Barbosa Alexandre 07709c5576 Unfold references for group labels when moving issue to another project 2016-10-19 14:58:25 -02:00
Robert Speicher 75739e54be Enable RSpec/NotToNot cop and auto-correct offenses
Also removes the note from the development/testing.md guide
2016-05-24 15:40:29 -04:00
Grzegorz Bizon cf21fd7a95 Fix rubocop offenses in upload rewriter specs 2016-03-31 10:41:57 +02:00
Grzegorz Bizon 57ea33bfd0 Extend specs for GFM uploads rewriter 2016-03-31 09:43:47 +02:00
Grzegorz Bizon b9f5719285 Remove reduntant `move_to_store` override 2016-03-30 12:50:19 +02:00
Grzegorz Bizon f2674c7b98 Refactor uploads rewriter used when moving issue 2016-03-30 10:44:18 +02:00
Grzegorz Bizon 0b8cefd3b2 Get FileUploader into test harness using factory
This attempts to get CarrierWave's uploader - `FileUploader` into test
harness using a factory. that makes it easier to build an instance of
it.

Along with !3435 it may be easier to use uploaders in tests
2016-03-30 10:44:18 +02:00
Grzegorz Bizon 701976e081 Add uploads rewriter and use it when moving issue 2016-03-30 10:44:18 +02:00
Grzegorz Bizon 6eb3105634 Find referable for each ref found in references rewriter 2016-03-20 10:52:01 +01:00
Grzegorz Bizon 323d328c86 Rename reference unfolder to rewriter, minor refactorings 2016-03-20 10:14:25 +01:00
Grzegorz Bizon 18f25bc942 Update reference unfolder according to recent ability changes
Commit 43d8bdb4f0 introduced additional
checks for permissions to read issue in references extractor.
2016-03-19 18:58:52 +01:00
Grzegorz Bizon 4354bfaba5 Add implementation of reference unfolder using banzai 2016-03-17 07:39:16 +01:00
Grzegorz Bizon fd8394faae Move reference unfolder for GFM to separate class 2016-03-17 07:39:15 +01:00