summaryrefslogtreecommitdiff
path: root/lib/gitlab/middleware/multipart.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/gitlab@14-7-stable-eev14.7.0-rc42GitLab Bot2022-01-201-2/+2
|
* Add latest changes from gitlab-org/gitlab@14-4-stable-eev14.4.0-rc42GitLab Bot2021-10-201-0/+1
|
* Add latest changes from gitlab-org/security/gitlab@14-2-stable-eeGitLab Bot2021-08-301-1/+1
|
* Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42GitLab Bot2021-08-191-1/+1
|
* Add latest changes from gitlab-org/gitlab@13-11-stable-eev13.11.0-rc43GitLab Bot2021-04-201-1/+1
|
* Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42Robert Speicher2021-01-201-98/+26
|
* Add latest changes from gitlab-org/security/gitlab@13-5-stable-eeGitLab Bot2020-10-301-0/+16
|
* Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42GitLab Bot2020-10-211-1/+2
|
* Add latest changes from gitlab-org/gitlab@13-4-stable-eeGitLab Bot2020-09-191-6/+93
|
* Add latest changes from gitlab-org/gitlab@13-2-stable-eeGitLab Bot2020-07-201-3/+16
|
* Add latest changes from gitlab-org/gitlab@13-0-stable-eeGitLab Bot2020-05-201-0/+1
|
* Add latest changes from gitlab-org/security/gitlab@12-10-stable-eeGitLab Bot2020-04-271-8/+10
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-04-151-0/+3
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-03-111-6/+12
|
* Process workhorse accelerated wiki uploadsAlessio Caiazza2019-09-061-2/+16
| | | | | Wiki attachments can be workhorse accelerated. This commit is backward compatible with older workhorse
* Avoid calling freeze on already frozen strings in lib/gitlabdineshpanda2019-09-041-1/+1
|
* Fix multipart attachments not uploadingsh-fix-multipart-uploads-failureStan Hu2019-01-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Mixing and matching the use of Rack::Request and ActionDispatch::Request in Rails 5 is bad, particularly if you have middleware that manipulates or accesses environment variables. `Gitlab::Middleware::Multipart` attempts to rewrite request parameters to the proper values (e.g. replacing `data_file` with `UploadedFile`). It does this by calling `Rack::Request#update_params`, which essentially updates `env['rack.request.form_hash']`. By changing to `ActionDispatch::Request`, the Go middleware was causing the request parameters to be stored inside `env['action_dispatch.request.request_parameters']`. Later calls to `Rack::Request#update_params` would not have any effect because it would attempt to update `env['rack.request.form_has']` instead of `env['action_dispatch.request.request_parameters']`. As a result, the controller still saw the old parameters. Since the Go middleware appears to be using `ActionDispatch::Request` for authorization methods, we can switch the multipart middleware to use it too. Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/9035
* Enable even more frozen string for lib/gitlabgfyoung2018-11-161-0/+2
| | | | | | | | | | | | | | | | Enables frozen string for the following: * lib/gitlab/hook_data/**/*.rb * lib/gitlab/i18n/**/*.rb * lib/gitlab/import/**/*.rb * lib/gitlab/import_export/**/*.rb * lib/gitlab/kubernetes/**/*.rb * lib/gitlab/legacy_github_import/**/*.rb * lib/gitlab/manifest_import/**/*.rb * lib/gitlab/metrics/**/*.rb * lib/gitlab/middleware/**/*.rb Partially addresses gitlab-org/gitlab-ce#47424.
* Fix multipart error on rails reloadAndrew Newdigate2018-09-051-1/+1
|
* Add public/uploads/tmp to allowed upload pathsjprovazn-fix-form-uploadsJan Provaznik2018-08-211-3/+7
| | | | | | | When direct_upload is enabled and a for file is being uploaded, then workhorse uses `public/uploads/tmp` path. If `uploads.storage_path` i sset to a different directory, then upload fails because `public/uploads/tmp` is not in allowed paths.
* Add FileUploader.root to allowed upload pathsJan Provaznik2018-07-081-1/+1
| | | | | | | | | | | | | | | | Currently we check if uploaded file is under `Gitlab.config.uploads.storage_path`, the problem is that uploads are placed in `uploads` subdirectory which is symlink. In allow_path? method we check real (expanded) paths, which causes that `Gitlab.config.uploads.storage_path` is expaned into symlink path and there is a mismatch with upload file path. By adding `Gitlab.config.uploads.storage_path/uploads` into allowed paths, this path is expaned during path check. `Gitlab.config.uploads.storage_path` is left there intentionally in case some uploader wouldn't use `uploads` subdir.
* Updated multipart to support workhorse direct uploadsJan Provaznik2018-06-271-7/+9
|
* Add `direct_upload` setting for artifactsdirect-upload-of-artifactsKamil Trzciński2018-04-051-1/+1
|
* Honour workhorse provided file nameac/4878-fix-attachments-extAlessio Caiazza2018-02-121-4/+4
| | | | | | | | | In the attempt to unify file uploading at workhorse level gitlab-org/gitlab-workhorse!230 we moved to a prefix-based tempfile creation in order to avoid upload collisions. Artifacts and LFS uploads already set original_filename to workhorse provided filename This commit add the same feature to `Gitlab::Middleware::Multipart`
* Adds Rubocop rule for line break around conditionals🙈 jacopo beschi 🙉2018-01-111-0/+2
|
* Enable Style/MutableConstantDouwe Maan2017-02-231-1/+1
|
* Inject ::UploadedFile from Multipart middlewareJacob Vosmaer2016-12-211-2/+6
| | | | | | I mistakenly concluded Rack::Multipart injects File instances into the params. These should be UploadedFile instances. This reuses a mock UploadedFile class we already had in GitLab.
* Add Gitlab::Middleware::MultipartJacob Vosmaer2016-12-151-0/+99