diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-07-15 15:06:19 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-07-15 15:06:19 +0200 |
commit | e300dac29302015cbba5b917ad5ea3657de62f0d (patch) | |
tree | e23c18222b91ca9455309de5b1b039ef5b42c4e7 | |
parent | bb9f827ddc51eba73c78be83b977a07e10638936 (diff) | |
download | gitlab-ce-fix-lfs-ci-fetch.tar.gz |
Fix LFS specsfix-lfs-ci-fetch
-rw-r--r-- | lib/gitlab/lfs/response.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/lfs/router.rb | 2 | ||||
-rw-r--r-- | spec/requests/lfs_http_spec.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/lfs/response.rb b/lib/gitlab/lfs/response.rb index 811363405a8..a1ee1aa81ff 100644 --- a/lib/gitlab/lfs/response.rb +++ b/lib/gitlab/lfs/response.rb @@ -47,6 +47,8 @@ module Gitlab end def render_storage_upload_store_response(oid, size, tmp_file_name) + return render_forbidden unless tmp_file_name + render_response_to_push do render_lfs_upload_ok(oid, size, tmp_file_name) end diff --git a/lib/gitlab/lfs/router.rb b/lib/gitlab/lfs/router.rb index 69bd5e62305..f2a76a56b8f 100644 --- a/lib/gitlab/lfs/router.rb +++ b/lib/gitlab/lfs/router.rb @@ -74,8 +74,6 @@ module Gitlab lfs.render_storage_upload_authorize_response(oid, size) else tmp_file_name = sanitize_tmp_filename(@request.env['HTTP_X_GITLAB_LFS_TMP']) - return nil unless tmp_file_name - lfs.render_storage_upload_store_response(oid, size, tmp_file_name) end end diff --git a/spec/requests/lfs_http_spec.rb b/spec/requests/lfs_http_spec.rb index aaad1e3a6ec..93d2bc160cc 100644 --- a/spec/requests/lfs_http_spec.rb +++ b/spec/requests/lfs_http_spec.rb @@ -557,7 +557,7 @@ describe Gitlab::Lfs::Router do end it 'does not recognize it as a valid lfs command' do - expect(response).to have_http_status(401) + expect(response).to have_http_status(403) end end end |