Read about our upcoming Code of Conduct on this issue

  1. 20 May, 2019 1 commit
  2. 07 May, 2019 1 commit
  3. 14 Mar, 2019 2 commits
  4. 06 Dec, 2018 1 commit
    • Jan Provaznik's avatar
      Optimized file search to work without limits · 25c6fc645f4e
      Jan Provaznik authored
      * removed 100 limit on file search results because we
        load all results anyway
      * expensive processing (parsing match content, utf encoding)
        is done only for selected page in paginated output
      25c6fc645f4e
  5. 30 Oct, 2018 1 commit
  6. 22 Oct, 2018 1 commit
  7. 11 Sep, 2018 1 commit
  8. 20 Jul, 2018 1 commit
  9. 04 Jun, 2018 1 commit
  10. 15 May, 2018 1 commit
  11. 19 Mar, 2018 1 commit
  12. 05 Mar, 2018 1 commit
  13. 14 Feb, 2018 1 commit
  14. 06 Feb, 2018 2 commits
  15. 23 Jan, 2018 1 commit
    • Jan Provaznik's avatar
      Use limit for search count queries · 6e854492e11d
      Jan Provaznik authored
      Search query is especially slow if a user searches a generic string
      which matches many records, in such case search can take tens of
      seconds or time out. To speed up the search query, we search only for
      first 1000 records, if there is >1000 matching records we just display
      "1000+" instead of precise total count supposing that with such amount
      the exact count is not so important for the user.
      
      Because for issues even limited search was not fast enough, 2-phase
      approach is used for issues: first we use simpler/faster query to get
      all public issues, if this exceeds the limit, we just return the limit.
      If the amount of matching results is lower than limit, we re-run more
      complex search query (which includes also confidential issues).
      Re-running the complex query should be fast enough in such case because the
      amount of matching issues is lower than limit.
      
      Because exact total_count is now limited, this patch also switches to
      to "prev/next" pagination.
      
      Related #40540
      6e854492e11d
  16. 16 Jan, 2018 1 commit
    • Sean McGivern's avatar
      Fix project search results for digits surrounded by colons · 6274342cbfdb
      Sean McGivern authored
      A file containing /:\d+:/ in its contents would break the search results if
      those contents were part of the results, because we were splitting on colons,
      which can't work with untrusted input.
      
      Changing to use the null byte as a separator is much safer.
      6274342cbfdb
  17. 30 Nov, 2017 1 commit
  18. 12 May, 2017 1 commit
  19. 10 May, 2017 1 commit
  20. 03 Apr, 2017 1 commit
  21. 24 Jan, 2017 2 commits
  22. 15 Dec, 2016 1 commit
    • Douwe Maan's avatar
      Merge branch 'jej-note-search-uses-finder' into 'security' · 8de73e176211
      Douwe Maan authored
      Fix missing Note access checks in by moving Note#search to updated NoteFinder
      
      Split from !2024 to partially solve https://gitlab.com/gitlab-org/gitlab-ce/issues/23867
      
      ## Which fixes are in this MR?
      
       - Potentially untested  
      💣 - No test coverage  
      🚥 - Test coverage of some sort exists (a test failed when error raised)  
      🚦 - Test coverage of return value (a test failed when nil used)  
       - Permissions check tested
      
      ### Note lookup without access check
      
      - [x]  app/finders/notes_finder.rb:13 :download_code check
      - [x]  app/finders/notes_finder.rb:19 `SnippetsFinder`
      - [x]  app/models/note.rb:121 [`Issue#visible_to_user`]
      - [x]  lib/gitlab/project_search_results.rb:113
        - This is the only use of `app/models/note.rb:121` above, but importantly has no access checks at all. This means it leaks MR comments and snippets when those features are `team-only` in addition to the issue comments which would be fixed by `app/models/note.rb:121`.
        - It is only called from SearchController where `can?(current_user, :download_code, @project)` is checked, so commit comments are not leaked.
      
      ### Previous discussions
      - [x] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#b915c5267a63628b0bafd23d37792ae73ceae272_13_13 `: download_code` check on commit
      - [x] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#b915c5267a63628b0bafd23d37792ae73ceae272_19_19 `SnippetsFinder` should be used
        - `SnippetsFinder` should check if the snippets feature is enabled -> https://gitlab.com/gitlab-org/gitlab-ce/issues/25223
      
      ###  Acceptance criteria met?
      - [x] Tests added for new code
      - [x] TODO comments removed
      - [x] Squashed and removed skipped tests
      - [x] Changelog entry
      - [ ] State Gitlab versions affected and issue severity in description
      - [ ] Create technical debt issue for NotesFinder.
        - Either split into `NotesFinder::ForTarget` and `NotesFinder::Search` or consider object per notable type such as `NotesFinder::OnIssue`. For the first option could create `NotesFinder::Base` which is either inherited from or which can be included in the other two.
        - Avoid case statement anti-pattern in this finder with use of `NotesFinder::OnCommit` etc. Consider something on the finder for this? `Model.finder(user, project)`
        - Move `inc_author` to the controller, and implement `related_notes` to replace `non_diff_notes`/`mr_and_commit_notes`
      
      See merge request !2035
      8de73e176211
  23. 16 Nov, 2016 1 commit
  24. 08 Nov, 2016 1 commit
  25. 20 Oct, 2016 2 commits
  26. 06 Sep, 2016 1 commit
  27. 03 Jun, 2016 2 commits
  28. 31 May, 2016 1 commit
  29. 17 Mar, 2016 1 commit
  30. 11 Mar, 2016 2 commits
    • Yorick Peterse's avatar
      Added ProjectSearchResults#project_ids_relation · cea5af140726
      Yorick Peterse authored
      This ensures some other methods such as the "issues" method still work.
      cea5af140726
    • Yorick Peterse's avatar
      Refactor Gitlab::ProjectSearchResults · 837ed19d33af
      Yorick Peterse authored
      Previously this class would be given a project ID which was then used to
      retrieve the corresponding Project object. However, in all cases the
      Project object was already known as it was used to grab the ID to pass
      to ProjectSearchResults. By just passing a Project instead we remove the
      need for an extra query as well as the need for some other complexity
      in this class.
      837ed19d33af
  31. 03 Nov, 2015 1 commit
  32. 02 Nov, 2015 1 commit
  33. 29 Oct, 2015 2 commits