We store the sizes as a hash from path to bytes like:
``` ruby
{'ci_artifacts.txt' => 27,
'other_artifacts_0.1.2/another-subdirectory/banana_sample.gif' =>
71759,
'other_artifacts_0.1.2/doc_sample.txt' => 1314,
'rails_sample.jpg' => 35255,
'tests_encoding/utf8 test dir ✓/regular_file_2' => 7}
```
So that it's easier to access than reading gzip file again.
Rename Licenses API to License Templates API
## What does this MR do?
Earlier I renamed this in EE, thinking license templates was an EE-only feature. This backports that change to CE. Thanks to @vsizov for pointing out this error.
See https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/400 for the EE merge request.
See merge request !4957
Fix an information disclosure when requesting access to a group containing private projects
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/19102.
The commit speaks for itself:
Fix an information disclosure when requesting access to a group containing private projects
The issue was with the `User#groups` and `User#projects` associations
which goes through the `User#group_members` and `User#project_members`.
Initially I chose to use a secure approach by storing the requester's
user ID in `Member#created_by_id` instead of `Member#user_id` because I
was aware that there was a security risk since I didn't know the
codebase well enough.
Then during the review, we decided to change that and directly store the
requester's user ID into `Member#user_id` (for the sake of simplifying
the code I believe), meaning that every `group_members` / `project_members`
association would include the requesters by default...
My bad for not checking that all the `group_members` / `project_members`
associations and the ones that go through them (e.g. `Group#users` and
`Project#users`) were made safe with the `where(requested_at: nil)` /
`where(members: { requested_at: nil })` scopes.
Now they are all secure.
See merge request !1973
Made the search bar on emoji menu sticky
## What does this MR do?
When scrolling down the emoji menu, the search bar disappears. For better UX, the search bar no stays at the top when scrolling.
## Screenshots (if relevant)

See merge request !4743
Update omniauth-saml to 1.6.0 to address a security vulnerability in ruby-saml
## What does this MR do?
Updates `omniauth-saml` to bring in the new `ruby-saml` dependency that addresses [CVE-2016-5697](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-5697)
Fixes#19206
See merge request !4951
Remove duplicate new page btn from edit wiki
## What does this MR do?
Removes duplicate button on wiki page
## What are the relevant issue numbers?
Closes#19075
## Screenshots (if relevant)


See merge request !4904
Fix check for existence of New Branch button on Issue page
## What does this MR do?
The condition in [`initCanCreateBranch`][initCanCreateBranch] mistakenly checks `$container` (the New Branch button) for falsy. However JQuery returns an empty array if no matching element was found, so this condition is never met.
## Why was this MR needed?
The wrong condition causes:
* `$.getJSON($container.data('path'))` to be called where `$container.data('path')` is `undefined`
* in this case `$.getJSON` uses `location.href`
* if the current page has a JSON representation, it is fetched and cached by browser and displayed the next time the page is visited (#17365)
* otherwise "Failed to check if new branch can be created" is displayed (#17264)
## What are the relevant issue numbers?
Fixes#17264 and #17365.
[initCanCreateBranch]: https://gitlab.com/gitlab-org/gitlab-ce/blob/v8.8.4/app/assets/javascripts/issue.js.coffee#L102
See merge request !4630
Revert Subresource Integrity pending a fix for Firefox's incorrect hashing implementation.
Per the discussion in #18230, Firefox support is broken :(
cc: @jschatz1
See merge request !4943
Better debugging for memory killer middleware
This adds more info to the warning messages output by `MemoryKiller`.
Previously only the PID was showed, making it difficult to debug issues like https://gitlab.com/gitlab-org/gitlab-ce/issues/19124
This adds the worker class and job ID to the log messages.
See merge request !4936
Image sizing
## What does this MR do?
Limits image height to fit the screen. The wrapping div is so the image is guaranteed to be a block element without the link area growing to be larger than the image itself.
## Are there points in the code the reviewer needs to double check?
Make sure this can't be done in a more performant or concise way with Banzai.
## Why was this MR needed?
Images were displayed at their full resolution, which made it difficult to read issues when the image height was greater than the viewport height (see #18861).
## What are the relevant issue numbers?
Fixes#18861.
## Screenshots (if relevant)
Before:

After:

## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] Tests
- [x] Added for this feature/bug
- [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
cc: @jschatz1 @dzaporozhets @rspeicher
See merge request !4810
Test templates and GitLabCI parser againts each other
## What does this MR do?
Test the available templates against the preprocessor and vice versa
## Are there points in the code the reviewer needs to double check?
The dynamic creation of tests seems a little hacked. Is there a cleaner way?
## Does this MR meet the acceptance criteria?
- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added -- Seems unneeded
- [x] All builds are passing
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if you do - rebase it please)
See merge request !4898
Update EE downgrade instructions to include JenkinsDeprecatedService
EE now includes JenkinsDeprecatedService in addition to JenkinsService, so we need to clean both when downgrading from EE to CE.
Closes#19133
[ci skip]
See merge request !4916
Add notices about disabling auth features for users with 2FA.
Related to #2979
- Document the proposed changes to the GitLab authentication system.
- This is done because currently, users with 2FA enabled are allowed API access without a 2FA token.
# Tasks
- [ ] #2979 !xxxx - Document proposed auth changes for 2FA users
- [x] Wait for replies on "[potential avenues for documenting the planned changes](https://gitlab.com/gitlab-org/gitlab-ce/issues/2979#note_12591578)"
- [x] Update documentation
- [ ] CHANGELOG entry?
- [ ] Merge conflicts
See merge request !4815
Improve validations and error handling in new CI config entries
## What does this MR do?
This MR improves validation in new CI config.
## Why was this MR needed?
With that it will be easier to handle errors during validation and post-processing.
## What are the relevant issue numbers?
This is a continuation of #15060
See merge request !4560
Clean up some unused templates imported from GitLab CI
## What does this MR do?
Clean up some unused templates imported from GitLab CI, for new developers to easily understand the file/directory structure of Gitlab CE.
## Are there points in the code the reviewer needs to double check?
Be sure if removed files are not used now while the committer checked them once.
## Why was this MR needed?
Because the file/directory structure of the repository should be clear and simple and if so new developers can easily understand the file/directory structure of Gitlab CE.
## What are the relevant issue numbers?
Closes#19158
## Does this MR meet the acceptance criteria?
- CHANGELOG won't be updated due to repository maintenance
- No documentation created/updated
- No API support added
- Tests
- [skipped] Added for this feature/bug
- [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
See merge request !4922