Commit Graph

47 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 2ac4833015 Add latest changes from gitlab-org/gitlab@master 2020-10-08 18:08:32 +00:00
GitLab Bot 0b4bb101ea Add latest changes from gitlab-org/gitlab@master 2020-10-01 18:10:20 +00:00
GitLab Bot 2c72daf2f1 Add latest changes from gitlab-org/gitlab@master 2020-03-30 18:08:07 +00:00
GitLab Bot 4aeb8a02c5 Add latest changes from gitlab-org/gitlab@master 2019-12-23 12:08:18 +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
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
Francisco Javier López b8cf360e2a Fixed bug with the content disposition with wiki attachments 2018-10-17 15:47:05 +00:00
gfyoung 12ee2753c1 Enable even more frozen string in app/controllers
Enables frozen string for some vestigial files as
well as the following:

* app/controllers/projects/**/*.rb
* app/controllers/sherlock/**/*.rb
* app/controllers/snippets/**/*.rb
* app/controllers/users/**/*.rb

Partially addresses #47424.
2018-09-25 22:43:49 -07:00
Francisco Javier López edb5759caf Fixed project logo when it is LFS tracked 2018-08-30 12:34:41 +00:00
Kia Mei Somabes 1e0f0de302 Refactor code for single file download in repository 2018-07-13 09:33:35 +08:00
Kia Mei Somabes 9f57ae11e9 Set content-disposition header for single file download in repository 2018-07-12 10:23:00 +08: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
Douwe Maan 720cc14a75 Refactor Blob support of external storage in preparation of job artifact blobs 2017-05-03 10:20:05 -05:00
Douwe Maan 0d1ec11e89 Use Blob methods instead of BlobHelper helpers 2017-04-27 12:23:26 -05: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 8c3ba8d6c9 Add workhorse controller and API helpers 2016-06-06 13:16:30 +02:00
Jacob Vosmaer 41bc9c463c Refactor caching code 2016-03-07 14:27:53 +01:00
Jacob Vosmaer fc90d9e589 Tell clients/proxies to cache raw blob requests 2016-03-03 17:59:47 +01:00
Jacob Vosmaer cf2c5396e0 Explain why we mangle blob content types 2016-02-24 11:53:30 +01:00
Jacob Vosmaer b2a634c352 Avoid trailing 'charset=' garbage 2016-02-01 12:01:13 +01:00
Jacob Vosmaer 02afa6793c Use only one header to send git blobs 2016-02-01 11:33:22 +01:00
Jacob Vosmaer 368b855d88 No need for base64 anymore 2016-01-28 18:08:37 +01:00
Jacob Vosmaer 26d97ac5e1 Send more raw blob data with workhorse 2016-01-28 18:04:46 +01:00
Jacob Vosmaer 67a6fee5b1 Prototype of Git blobs via workhorse 2016-01-15 18:12:36 +01:00
Marin Jankovski e53b350cb6 Add specs for showing lfs object in UI. 2015-12-07 15:03:50 +01:00
Marin Jankovski ea52a81da4 Move the file serving to Raw controller, add a few ifs to view. 2015-12-03 17:08:09 +01:00
Valery Sizov 8346dde052 Only render 404 page from /public 2015-10-13 20:12:34 +03: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
Jeroen van Baarsen 5a4ebfb47a Fixed the Rails/ActionFilter cop
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-04-20 15:39:37 +02:00
Douwe Maan 00408f37e3 Move 'require_non_empty_project' filter to front so 'assign_ref_vars' doesn't 404. 2015-02-20 17:20:03 +01:00
Dmitriy Zaporozhets d04344373b Rubocop: no trailing newlines 2015-02-02 21:53:27 -08:00
Dmitriy Zaporozhets c916124178 Explicitly set before_filter for ref-related controllers 2015-01-26 15:01:51 -08:00
Valery Sizov 6f34d40436 remove auth duplication 2014-11-05 11:04:08 +02:00
Ciro Santilli 4d0d5e79ba Factor authorize_push! and authorize_code_access!
with existing method_missing. Pattern already used extensively,
so let's be consistent and use it everywhere.
2014-10-13 21:31:49 +02:00
Dmitriy Zaporozhets 6f154c07c8
Prevent possible XSS issues by seting text/plain for all text files in
RAW feature

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-08-28 10:42:52 +03:00
Jeroen van Baarsen aaad7fd973 Fixes #6207 Allow raw download of *.msi files
This PR also allows for download of [exe,rar,r0n,7z,7zip,zip]
Fix was originaly proposed by @MensSana
2014-02-13 20:09:11 +01:00
Dmitriy Zaporozhets 970d86b7c5 Refactor blob finding 2013-10-01 20:34:41 +03:00
Dmitriy Zaporozhets ae9dd62762 Update code to work with gitlab_git 3 2013-10-01 17:00:28 +03:00
Dmitriy Zaporozhets 38cebe03bc Dont allow html render for RAW view 2013-09-03 20:55:01 +03:00
Dmitriy Zaporozhets 2ed7cbfba4 Move projects controllers/views in Projects module 2013-06-23 19:47:22 +03:00