diff options
author | Mark Chao <mchao@gitlab.com> | 2019-02-18 11:51:56 +0800 |
---|---|---|
committer | Mark Chao <mchao@gitlab.com> | 2019-02-19 14:42:38 +0800 |
commit | d8f0d347b45aa57ac726d59fbd164df5c3a8e60a (patch) | |
tree | 88fa2da42e98aff32a3075c67b496c701f7b8891 /spec/lib/constraints | |
parent | c46c62c51316da73724848b5f0dcb5aba82475e2 (diff) | |
download | gitlab-ce-d8f0d347b45aa57ac726d59fbd164df5c3a8e60a.tar.gz |
Fix git clone revealing private repo's presence
Ensure redirection to path with .git suffix regardless whether project
exists or not.
Diffstat (limited to 'spec/lib/constraints')
-rw-r--r-- | spec/lib/constraints/project_url_constrainer_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/lib/constraints/project_url_constrainer_spec.rb b/spec/lib/constraints/project_url_constrainer_spec.rb index c96e7ab8495..3496b01ebcc 100644 --- a/spec/lib/constraints/project_url_constrainer_spec.rb +++ b/spec/lib/constraints/project_url_constrainer_spec.rb @@ -16,6 +16,10 @@ describe Constraints::ProjectUrlConstrainer do let(:request) { build_request('foo', 'bar') } it { expect(subject.matches?(request)).to be_falsey } + + context 'existence_check is false' do + it { expect(subject.matches?(request, existence_check: false)).to be_truthy } + end end context "project id ending with .git" do |