d165754400
In production, we see high error rates due to clients attempting to use the dumb Git HTTP protocol with HEAD /foo/bar.git/info/refs endpoint. This isn't supported and causes Error 500s because Workhorse doesn't send along its secret because it's not proxying this request. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/54579
15 lines
377 B
Ruby
15 lines
377 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'spec_helper'
|
|
|
|
describe Projects::GitHttpController do
|
|
describe 'HEAD #info_refs' do
|
|
it 'returns 403' do
|
|
project = create(:project, :public, :repository)
|
|
|
|
head :info_refs, params: { namespace_id: project.namespace.to_param, project_id: project.path + '.git' }
|
|
|
|
expect(response.status).to eq(403)
|
|
end
|
|
end
|
|
end
|