summaryrefslogtreecommitdiff
path: root/lib/gitlab/utils
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/security/gitlab@13-12-stable-eeGitLab Bot2021-05-311-0/+24
|
* Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42GitLab Bot2021-05-192-12/+46
|
* Add latest changes from gitlab-org/gitlab@13-11-stable-eev13.11.0-rc43GitLab Bot2021-04-201-0/+15
|
* Add latest changes from gitlab-org/gitlab@13-10-stable-eeGitLab Bot2021-03-261-0/+25
|
* Add latest changes from gitlab-org/gitlab@13-10-stable-eev13.10.0-rc40GitLab Bot2021-03-161-8/+86
|
* Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42GitLab Bot2021-02-184-12/+20
|
* Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42Robert Speicher2021-01-201-3/+7
|
* Add latest changes from gitlab-org/gitlab@13-7-stable-eev13.7.0-rc42GitLab Bot2020-12-171-0/+12
|
* Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42GitLab Bot2020-10-211-3/+2
|
* Add latest changes from gitlab-org/gitlab@13-4-stable-eeGitLab Bot2020-09-193-4/+75
|
* Add latest changes from gitlab-org/gitlab@13-3-stable-eeGitLab Bot2020-08-201-1/+1
|
* Add latest changes from gitlab-org/gitlab@13-2-stable-eeGitLab Bot2020-07-202-5/+28
|
* Add latest changes from gitlab-org/gitlab@13-1-stable-eeGitLab Bot2020-06-182-2/+112
|
* Add latest changes from gitlab-org/gitlab@13-0-stable-eeGitLab Bot2020-05-201-28/+30
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-04-011-9/+11
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-03-051-2/+3
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-03-042-1/+105
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-02-251-0/+74
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-02-191-4/+4
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-02-151-0/+27
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-02-051-2/+2
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-01-031-0/+45
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-12-181-4/+9
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-11-121-0/+4
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-10-011-4/+13
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-09-232-0/+84
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-09-181-1/+1
|
* Add a predicate to check for strong memoizationNick Thomas2019-09-101-1/+5
|
* Extract SanitizeNodeLink and apply to WikiLinkFilterKerri Miller2019-07-261-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | The SanitizationFilter was running before the WikiFilter. Since WikiFilter can modify links, we could see links that _should_ be stopped by SanatizationFilter being rendered on the page. I (kerrizor) had previously addressed the bug in: https://gitlab.com/gitlab-org/gitlab-ee/commit/7bc971915bbeadb950bb0e1f13510bf3038229a4 However, an additional exploit was discovered after that was merged. Working through the issue, we couldn't simply shuffle the order of filters, due to some implicit assumptions about the order of filters, so instead we've extracted the logic that sanitizes a Nokogiri-generated Node object, and applied it to the WikiLinkFilter as well. On moving filters around: Once we start moving around filters, we get cascading failures; fix one, another one crops up. Many of the existing filters in the WikiPipeline chain seem to assume that other filters have already done their work, and thus operate on a "transform anything that's left" basis; WikiFilter, for instance, assumes any link it finds in the markdown should be prepended with the wiki_base_path.. but if it does that, it also turns `href="@user"` into `href="/path/to/wiki/@user"`, which the UserReferenceFilter doesn't see as a user reference it needs to transform into a user profile link. This is true for all the reference filters in the WikiPipeline.
* Prevent Billion Laughs attackFabio Pitino2019-07-021-0/+79
| | | | | | It keeps track of the memory being used when loading the YAML file as well as the depth of nesting. Track exception when YAML is too big
* Add cache to the 'compile-assets' and 'gitlab:assets:compile' jobsRémy Coutable2019-02-053-0/+6
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Extend override check to also check arity42125-extend-override-check-to-also-check-arityJacopo2018-12-221-31/+78
| | | | | Override now cares about parents method arity: if parents arity doesn't match raises an error.
* Enable even more frozen string for lib/gitlabgfyoung2018-11-193-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Enables frozen string for the following: * lib/gitlab/patch/**/*.rb * lib/gitlab/popen/**/*.rb * lib/gitlab/profiler/**/*.rb * lib/gitlab/project_authorizations/**/*.rb * lib/gitlab/prometheus/**/*.rb * lib/gitlab/query_limiting/**/*.rb * lib/gitlab/quick_actions/**/*.rb * lib/gitlab/redis/**/*.rb * lib/gitlab/request_profiler/**/*.rb * lib/gitlab/search/**/*.rb * lib/gitlab/sherlock/**/*.rb * lib/gitlab/sidekiq_middleware/**/*.rb * lib/gitlab/slash_commands/**/*.rb * lib/gitlab/sql/**/*.rb * lib/gitlab/template/**/*.rb * lib/gitlab/testing/**/*.rb * lib/gitlab/utils/**/*.rb * lib/gitlab/webpack/**/*.rb Partially addresses gitlab-org/gitlab-ce#47424.
* Following the feedbacksLin Jen-Shin2018-09-111-3/+3
|
* Fix Override. Properly define prependedLin Jen-Shin2018-09-111-2/+6
| | | | We should never be sloppy!
* Also verify if extending would override a class methodoverride-consider-extendLin Jen-Shin2018-06-051-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since extending a class means including on the singleton class of the class, this should now complain this: ``` ruby module M extend Gitlab::Utils::Override override :f def f super.succ end end class C extend M def self.f 0 end end ``` It should complain because `C.f` wasn't calling `M#f`. This should pass verification: ``` ruby module M extend Gitlab::Utils::Override override :f def f super.succ end end class B def self.f 0 end end class C < B extend M end ``` Because `C.f` would now call `M#f`, and `M#f` does override something.
* Use `Gitlab::Utils::Override` over defined?(super)Lin Jen-Shin2017-12-261-0/+111
|
* Use memoization for commits on diffsZeger-Jan van de Weg2017-12-121-5/+15
| | | | | | | | | | | | | | | | The Gitaly CommitService is being hammered by n + 1 calls, mostly when finding commits. This leads to this gRPC being turned of on production: https://gitlab.com/gitlab-org/gitaly/issues/514#note_48991378 Hunting down where it came from, most of them were due to MergeRequest#show. To prove this, I set a script to request the MergeRequest#show page 50 times. The GDK was being scraped by Prometheus, where we have metrics on controller#action and their Gitaly calls performed. On both occations I've restarted the full GDK so all caches had to be rebuild. Current master, 806a68a81f1baee, needed 435 requests After this commit, 154 requests
* Add Gitlab::Utils::StrongMemoizeLin Jen-Shin (godfat)2017-11-131-0/+31
|
* Move merging of Hashes out of the `GroupDescendant` concernBob Van Landuyt2017-10-041-0/+117
Since it can technically merge any hash with objects that respond to `==`