summaryrefslogtreecommitdiff
path: root/spec/lib/constraints
diff options
context:
space:
mode:
authorMark Chao <mchao@gitlab.com>2019-02-18 11:51:56 +0800
committerMark Chao <mchao@gitlab.com>2019-02-19 13:59:24 +0800
commit9d046c8704c0e7df18d2f9e380e987d22b9a0b2e (patch)
tree7f5f53fba0bc7f3a09458fd04acb64d4ad91a29b /spec/lib/constraints
parent701303a5dba78a217d8050316b0c6ea2f2c4c519 (diff)
downloadgitlab-ce-9d046c8704c0e7df18d2f9e380e987d22b9a0b2e.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.rb4
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