Skip to content
Snippets Groups Projects
  1. Feb 25, 2020
  2. Feb 19, 2020
  3. Feb 15, 2020
  4. Feb 05, 2020
  5. Jan 03, 2020
  6. Dec 18, 2019
  7. Nov 12, 2019
  8. Oct 01, 2019
  9. Sep 23, 2019
  10. Sep 18, 2019
  11. Sep 10, 2019
  12. Jul 26, 2019
    • Kerri Miller's avatar
      Extract SanitizeNodeLink and apply to WikiLinkFilter · acc694ea
      Kerri Miller authored
      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.
      acc694ea
  13. Jul 02, 2019
  14. Feb 05, 2019
  15. Dec 22, 2018
  16. Nov 20, 2018
    • gfyoung's avatar
      Enable even more frozen string for lib/gitlab · f93f8f56
      gfyoung authored
      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.
      f93f8f56
  17. Sep 11, 2018
  18. Jun 05, 2018
    • Lin Jen-Shin's avatar
      Also verify if extending would override a class method · f71fc932
      Lin Jen-Shin authored
      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.
      f71fc932
  19. Dec 26, 2017
  20. Dec 12, 2017
    • Zeger-Jan van de Weg's avatar
      Use memoization for commits on diffs · 3ab026b7
      Zeger-Jan van de Weg authored
      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, 806a68a8, needed 435 requests
      After this commit, 154 requests
      Unverified
      3ab026b7
  21. Nov 13, 2017
  22. Oct 04, 2017
Loading