Commit graph

10 commits

Author SHA1 Message Date
Stan Hu
e67481e079 Properly handle LFS Batch API response in project import
Project imports were failing with `undefined method each_with_object for
String` because the import was attempting to parse the LFS Batch API and
failing due to the fact that the Content-Type wasn't a supported format
(e.g. application/vnd.git-lfs+json instead of application/json). We now
parse the body as JSON.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/61624
2019-05-09 18:04:40 -05:00
Francisco Javier López
6f0d8ebc45 Refactored LfsImportService and ImportService
In order to make `LfsImportService` more reusable, we
need to extract the logic inside `ImportService` and
encapsulate it into the service.
2019-04-30 08:21:21 +00:00
Nick Thomas
9f05e97aad
Run rubocop -a 2019-03-13 13:42:43 +00:00
Francisco Javier López
b3c13bbb3c
Added validations to prevent LFS object forgery 2019-01-31 16:51:54 +01:00
Francisco Javier López
b7a9c26a5b
Fixed SSRF in project imports with LFS 2018-12-18 09:01:17 +01:00
Nick Thomas
3ee0710d1d
Validate LFS hrefs before downloading them 2018-12-11 18:13:44 +00:00
Yorick Peterse
2039c8280d
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
2018-09-11 17:32:00 +02:00
gfyoung
fbde835404 Enable more frozen string in app/services/**/*.rb
Partially addresses #47424.
2018-07-17 15:19:40 -07:00
Lin Jen-Shin
9286f5b934 Use stable gitlab-styles and eliminate offenses 2018-07-09 21:13:08 +08:00
Francisco Javier López
e8f49b4bee Support LFS objects when creating a project by import 2018-06-06 16:42:18 +00:00