Commit graph

7 commits

Author SHA1 Message Date
Thong Kuah
f540ffcef6 Add frozen_string_literal to spec/lib (part 1)
Using the sed script from
https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
2019-07-26 13:25:07 +12:00
Rémy Coutable
c563e29fb3
Get rid of the user_namespace API helper method
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-04-24 19:39:59 +02:00
Stan Hu
41b51c0656 Encode Content-Disposition filenames
Users downloading non-ASCII attachments would see garbled characters.
When used with object storage, AWS S3 would return an InvalidArgument
error: Header value cannot be represented using ISO-8859-1.

Per RFC 5987 and RFC 6266, Content-Disposition should be encoded
properly. This commit takes the Rails 6 implementation of
ActiveSuppport::Http::ContentDisposition
(https://github.com/rails/rails/pull/33829) and ports it here.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/47673
2019-02-04 23:12:44 -08:00
Francisco Javier López
40887a94bd Fix files/blob api endpoint content disposition 2019-01-10 12:30:19 +00:00
Francisco Javier López
2cd47bba9a
Fixed api content-disposition in blob and files endpoint 2018-12-31 13:02:32 +01:00
Andreas Brandl
c4e4258721 Validate project path prior to hitting the database.
Closes #45247.
2018-04-13 15:59:45 +02:00
Tomasz Maczukin
a9212e0f07
Add some unit tests for lib/api/helpers.rb 2017-11-27 23:06:42 +01:00