Forbid scripting for wiki files
Wiki files (not pages - files in the repo) are just sent to the browser
with whatever content-type the mime_types gem assigns to them based on
their extension. As this is from the same domain as the GitLab
application, this is an XSS vulnerability.
Set a CSP forbidding all sources for scripting, CSS, XHR, etc. on these
files.
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/17298.
See merge request !1969
Fix vulnerability that leaks private labels and milestones
This fixes vulnerability that leaks information about private labels and milestones because of insecure direct object reference in issueable create service.
This affects merge requests and issues.
See https://gitlab.com/gitlab-org/gitlab-ce/issues/15439
This MR introduces additional check that rejects labels and milestone that does not belong to the same project issue/merg request does.
`IssuableBaseService` may benefit from encapsulating filters in separate class/module, which then may improve coherency in this class.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/15439
See merge request !1954
Signed-off-by: Rémy Coutable <remy@rymai.me>
Fix timeout issue for rake task gitlab:backup:create
This is a fix for a database timeout which can occur when the backup
create task is taking very long (1-2 hours).
It seems that ActiveRecord is loosing the connection after a hour
idleness and need to be reconnected before use.
See merge request !2757
This solves https://dev.gitlab.org/gitlab/gitlabhq/issues/2646
1. This MR simplifies CI permission model:
- read_build: allows to read a list of builds, artifacts and trace
- update_build: allows to cancel and retry builds
- admin_build: allows to manage triggers, runners and variables
- read_commit_status: allows to read a list of commit statuses (including the status of a build, but doesn't allow to see a build details)
- create_commit_status: allows to create a new commit status using API
2. I do make sure that the proper permissions are used in all places where the CI can be shown.
3. Add the `read_build` ability if user is anonymous or guest and allow_guest_to_access_builds is enabled.
4. Add CI setting: public_builds.
5. The artifacts specific permission are removed, since they are covered by `*_build`.
Allow manual resize of js-autosize textareas
First, the autosize library was being too controlling and removed the
`resize` property from any elements to which it was attached, removing
the drag handle. We've disabled this behavior in the vendored library
and added a spec to prevent a regression during an upgrade.
Second, we detect (as best we can) when the user manually resizes an
autosize textarea, and then remove the autosize behavior from it and
increase its max-height.
This should allow for the best of both worlds.
Closes#12832
See merge request !2653
Increase LFS objects size column
Fixes#12745
Increases the `size` column integer limit to an 8-byte integer. This allows for a max value of `9223372036854775807` which is 9,223,372,036 GB. That should do it 😃
I tested this by first reproducing the error (push a file larger than 2.1 GB). The error was:
```
RangeError (3145728000 is out of range for ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Integer with limit 4):
lib/gitlab/lfs/response.rb:232:in `store_file'
lib/gitlab/lfs/response.rb:170:in `render_lfs_upload_ok'
lib/gitlab/lfs/response.rb:51:in `block in render_storage_upload_store_response'
lib/gitlab/lfs/response.rb:204:in `render_response_to_push'
lib/gitlab/lfs/response.rb:50:in `render_storage_upload_store_response'
lib/gitlab/lfs/router.rb:76:in `put_response'
lib/gitlab/lfs/router.rb:20:in `try_call'
lib/gitlab/backend/grack_auth.rb:41:in `call'
lib/gitlab/backend/grack_auth.rb:18:in `call_with_kerberos_support'
lib/gitlab/backend/grack_auth.rb:8:in `call'
```
Then I ran this migration and pushed the file again. It uploaded successfully.
See merge request !2644
Update sentry-raven gem.
Should resolve `fatal: Not a git repository (or any of the parent directories): .git` warnings.
Fixes#12657
See merge request !2636