Commit Graph

43 Commits

Author SHA1 Message Date
GitLab Bot dec7332357 Add latest changes from gitlab-org/gitlab@master 2021-01-07 18:10:38 +00:00
GitLab Bot f3506a4dee Add latest changes from gitlab-org/gitlab@master 2020-12-02 00:09:45 +00:00
GitLab Bot 6d9c4dc2ef Add latest changes from gitlab-org/gitlab@master 2020-11-16 18:09:15 +00:00
GitLab Bot 534eb932e0 Add latest changes from gitlab-org/gitlab@master 2020-11-11 03:08:57 +00:00
GitLab Bot 0b4bb101ea Add latest changes from gitlab-org/gitlab@master 2020-10-01 18:10:20 +00:00
GitLab Bot 8b0ef13236 Add latest changes from gitlab-org/gitlab@master 2020-06-03 18:08:28 +00:00
GitLab Bot 2c72daf2f1 Add latest changes from gitlab-org/gitlab@master 2020-03-30 18:08:07 +00:00
GitLab Bot db24ab2b72 Add latest changes from gitlab-org/gitlab@master 2020-01-28 12:08:44 +00:00
GitLab Bot 22e9af3c8b Add latest changes from gitlab-org/gitlab@master 2020-01-27 12:08:35 +00:00
GitLab Bot 4aeb8a02c5 Add latest changes from gitlab-org/gitlab@master 2019-12-23 12:08:18 +00:00
GitLab Bot 7f8330873c Add latest changes from gitlab-org/gitlab@master 2019-12-18 21:07:37 +00:00
GitLab Bot e723867717 Add latest changes from gitlab-org/gitlab@master 2019-12-17 18:07:48 +00:00
GitLab Bot 784fae4b9d Add latest changes from gitlab-org/gitlab@master 2019-12-12 12:07:33 +00:00
GitLab Bot e1867c38fc Add latest changes from gitlab-org/gitlab@master 2019-12-06 18:07:44 +00:00
GitLab Bot 134fe18200 Add latest changes from gitlab-org/gitlab@master 2019-12-05 21:07:40 +00:00
Stan Hu e632ae8084 Standardize remote_ip and path keys for auth.log and api_json.log
Current `auth.log` uses `fullpath` and `ip`, while `api_json.log` uses
`remote_ip` and `path` for the same fields. Let's standardize these
namings to make it easier for people working with the data.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/66167
2019-08-20 18:12:28 +00:00
Mayra Cabrera b6c51f57dd Return 429 on rate limiter on raw endpoint
It was originally returning 302 when the rate limit kicks in, because
using the the correct status code makes it easier to track rate limiting
events

Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/65974
2019-08-13 18:13:37 +00:00
Mayra Cabrera 3cefc5d7df Add RateLimiter to RawController
* Limits raw requests to 300 per minute and per raw path.
* Add a new attribute to ApplicationSettings so user can change this
value on their instance.
* Uses Gitlab::ActionRateLimiter to limit the raw requests.
* Add a new method into ActionRateLimiter to log the event into auth.log

Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/48717
2019-07-24 19:49:31 +00:00
Luke Duncalfe c7dcbc03bb CE backport for changes in EE MR 13389
This backports to ce a refactor of the shared example 'a controller that
can serve LFS files'.

The ee MR that contains the original refactor is
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/13389

The reason for the refactor was mostly the removal of the outer context
as it didn't need to be there, and prevented let(:lfs_oid) from being
overwritten.

The shared example was also renamed to be more descriptive.
2019-06-06 14:22:41 +12:00
gfyoung 93a44e135b Add some frozen string to spec/**/*.rb
Adds frozen string to the following:

* spec/bin/**/*.rb
* spec/config/**/*.rb
* spec/controllers/**/*.rb

xref https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
2019-04-15 10:17:05 +00:00
Francisco Javier López 33e5955671
Removing workhorse_set_content_type feature flag
Removing workhorse_set_content_type feature flag introduced in
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22667
2018-12-19 13:05:44 +01:00
blackst0ne b44a2c801a Update specs to rails5 format
Updates specs to use new rails5 format.

The old format:
`get :show, { some: params }, { some: headers }`

The new format:
`get :show, params: { some: params }, headers: { some: headers }`
2018-12-19 10:04:31 +11:00
Francisco Javier López cf8b8ff99b Add feature flag for workhorse content type calculation 2018-12-06 21:22:39 +00:00
Francisco Javier López edb5759caf Fixed project logo when it is LFS tracked 2018-08-30 12:34:41 +00:00
Kamil Trzciński 9bb7abedf5 Fix file_store for artifacts and lfs when saving 2018-05-01 22:27:54 +02:00
Sean McGivern a7dae52e9d Merge branch '4163-move-uploads-to-object-storage' into 'master'
Move uploads to object storage

Closes #4163

See merge request gitlab-org/gitlab-ee!3867
2018-02-28 20:58:15 +01:00
Kamil Trzciński e3fafa7632 Merge commit 'f2f58a60b76acd479e37bdbc9246ec9f9b2bea82' into object-storage-ee-to-ce-backport 2018-02-28 20:36:07 +01:00
Douwe Maan bc76062774 Merge branch 'jej/lfs-object-storage' into 'master'
Can migrate LFS objects to S3 style object storage

Closes #2841

See merge request !2760
2018-02-28 20:29:37 +01:00
Jacopo 2f40dac352 Refactor `have_http_status` into `have_gitlab_http_status` in the specs 2017-10-20 10:13:18 +02:00
Grzegorz Bizon 0430b76441 Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
Christopher Bartz 7849683766 Do not show LFS object when LFS is disabled
Do not display a 404, when a user tries to retrieve the raw content of
an LFS file (pointer) if the config option "lfs_enabled" is set to
false. Instead, display the LFS pointer file directly.
2017-03-13 18:15:19 +01:00
Douwe Maan ad640bc5f9 Use Namespace#full_path instead of #path where appropriate 2017-02-23 17:55:01 -06:00
Robert Speicher 4642ca6686 Use `empty_project` where possible in controller specs 2017-01-25 17:14:38 -05:00
tiagonbotelho 519275c110 fixes part1 of files to start using active tense 2016-08-09 15:06:23 +01:00
Z.J. van de Weg abca19da8b Use HTTP matchers if possible 2016-06-27 20:10:42 +02:00
Douwe Maan 8c3ba8d6c9 Add workhorse controller and API helpers 2016-06-06 13:16:30 +02:00
Mehmet Emin İNAÇ 6a0ea605e8 Change deprecated usage of rendering without response body
`render nothing: true` has been deprecated.
For more information see [pr](https://github.com/rails/rails/pull/20336)
2016-03-16 03:16:25 +02:00
Marin Jankovski 6245be083d All for you rubocop. 2015-12-08 14:00:15 +01:00
Marin Jankovski ea5b462a14 Stub the calls to disk and check what send_file returns. 2015-12-08 13:33:12 +01:00
Marin Jankovski 9bf51ae47d Fix specs caused by update of gitlab-test repo. 2015-12-08 10:58:15 +01:00
Marin Jankovski e53b350cb6 Add specs for showing lfs object in UI. 2015-12-07 15:03:50 +01:00
pilsner 4144c59941 add Content-Type header of raw image file
Add Content-Type header to fix a bug which IE can't show image in
markdown when the image is from raw.

	modified:   CHANGELOG
	modified:   app/controllers/projects/raw_controller.rb
	modified:   spec/controllers/projects/raw_controller_spec.rb
2015-09-04 13:06:02 +09:00
Stan Hu 551157960e Remove the filename argument from Content-Disposition header to avoid
RFC 5987 and RFC 6266 encoding issues. This change allows the browser
to determine the filename based on the URL.

See: http://greenbytes.de/tech/tc2231/

Closes https://github.com/gitlabhq/gitlabhq/issues/9595

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/1829
2015-09-02 00:20:05 -07:00