Commit Graph

37 Commits

Author SHA1 Message Date
GitLab Bot c592490e7f Add latest changes from gitlab-org/gitlab@master 2021-11-25 21:09:52 +00:00
GitLab Bot 46aea02972 Add latest changes from gitlab-org/gitlab@master 2021-06-16 00:10:15 +00:00
GitLab Bot 25db9c1230 Add latest changes from gitlab-org/gitlab@master 2021-05-06 12:10:38 +00:00
GitLab Bot 099333e261 Add latest changes from gitlab-org/gitlab@master 2021-03-18 00:08:58 +00:00
GitLab Bot 9c0f4306f6 Add latest changes from gitlab-org/gitlab@master 2021-03-11 15:09:10 +00:00
GitLab Bot c59765a50a Add latest changes from gitlab-org/gitlab@master 2020-06-24 18:09:03 +00:00
GitLab Bot d10a462fed Add latest changes from gitlab-org/gitlab@master 2019-12-16 12:07:43 +00:00
GitLab Bot 8cc5f27909 Add latest changes from gitlab-org/gitlab@master 2019-12-13 12:07:41 +00:00
Thong Kuah f540ffcef6 Add frozen_string_literal to spec/lib (part 1)
Using the sed script from
https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
2019-07-26 13:25:07 +12:00
Francisco Javier López c40400ceae [master] Stored XSS in Gitlab Merge Request from imported repository 2018-10-01 16:44:30 +00:00
Chantal Rollison 81a403f05f Escaped html characters 2018-08-21 07:37:33 -07:00
Bob Van Landuyt 5f7f5eda92 Method to track recoverable exceptions in sentry
This adds a method to track errors that can be recovered from in
sentry.

It is useful when debugging performance issues, or exceptions that are
hard to reproduce.
2018-04-17 11:39:23 +02:00
Sean McGivern cdf3ae04f8 Fix 500 error when diff context line has broken encoding
Rugged sometimes chops a context line in between bytes, resulting in the context
line having an invalid encoding: https://github.com/libgit2/rugged/issues/716

When that happens, we will try to detect the encoding for the diff, and
sometimes we'll get it wrong. If that difference in encoding results in a
difference in string lengths between the diff and the underlying blobs, we'd
fail to highlight any inline diffs, and return a 500 status to the user.

As we're using the underlying blobs, the encoding is 'correct' anyway, so if the
string range is invalid, we can just discard the inline diff highlighting. We
still report to Sentry to ensure that we can investigate further in future.
2018-02-22 12:26:23 +00:00
Rémy Coutable cddc5cacfb Use described_class when possible
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02:00
Rémy Coutable ddccd24c13 Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02:00
Douwe Maan 02650d97e5 Fix specs 2017-05-10 08:26:21 -05:00
Douwe Maan f90909307e Fix specs 2017-03-14 15:29:31 -06:00
Douwe Maan bdbc7d967a Revert "Enable Style/BarePercentLiterals"
This reverts commit 96bef54154e669f9a3e92c3a4bc76c0be3a52e48.
2017-02-23 09:32:42 -06:00
Douwe Maan baafd8de26 Enable Style/BarePercentLiterals 2017-02-23 09:31:57 -06:00
Valery Sizov ceb1ebd959 Active tense test coverage
Ports changes from https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/642 back into CE
2017-02-01 22:45:41 +00:00
Robert Speicher 80a6d2fda2 Use `:empty_project` where possible throughout spec/lib 2017-01-25 12:25:42 -05:00
Paco Guzman c86c1905b5 switch from diff_file_collection to diffs
So we have raw_diffs too
2016-08-03 07:00:20 +02:00
http://jneen.net/ e9f191907c apparently this gets encoded now? 2016-07-14 10:08:15 -07:00
http://jneen.net/ ff7e679bca we no longer encode double-quotes 2016-07-14 10:08:15 -07:00
Douwe Maan a9fa45f09e Represent DiffRefs as proper class instead of tuple array 2016-07-06 18:50:58 -04:00
Douwe Maan fa0cbb1399 Fix specs and add a new one 2016-01-30 12:53:12 +01:00
Douwe Maan 677b4db9e6 Mark inline difference between old and new paths when a file is renamed 2016-01-29 19:37:17 +01:00
Douwe Maan 26f7d023e6 Update tests 2016-01-20 17:14:26 +01:00
Douwe Maan 512bebe21d Refactor Gitlab::Highlight and fix tests 2016-01-19 14:52:41 +01:00
Rubén Dávila 6b9c730e91 More refactoring from last code review. #3945
* Use commit objects instead of IDs when generating diffs
* Use proper references when generating MR's source and target
* Update broken specs
2016-01-14 16:47:55 -05:00
Douwe Maan 8dfad143d4 Add inline diff markers in highlighted diffs. 2016-01-14 22:28:07 +01:00
Rubén Dávila f547e733d1 Add more specs. #3945 2016-01-12 17:49:11 -05:00
Rubén Dávila 52f8286a02 Update specs. #3945 2016-01-08 18:40:05 -05:00
Rubén Dávila 3fbcf52ec8 Apply syntax highlighting when expanding diff plus some refactor. #3945 2015-12-31 01:05:52 -05:00
Rubén Dávila fd100e1ef1 Don't modify "match" diff lines. #3945 2015-12-30 21:44:12 -05:00
Rubén Dávila 8b079315d9 A bit of refactoring. #3945 2015-12-30 21:23:50 -05:00
Rubén Dávila d83275620a Add specs for Gitlab::Diff::Highlight. #3945 2015-12-30 20:18:40 -05:00