diff options
author | Mark Chao <mchao@gitlab.com> | 2019-04-10 11:39:45 +0800 |
---|---|---|
committer | Mark Chao <mchao@gitlab.com> | 2019-05-03 03:02:58 +0800 |
commit | d8bddb16624f34600069bb5d3540960b25176381 (patch) | |
tree | 6e38172e12eb8d5a5c1645b30cccdda9f7f08809 /spec/lib/gitlab/bitbucket_import | |
parent | 74ac04a6aa7a9398ed908f47080e64ec40e0dee8 (diff) | |
download | gitlab-ce-d8bddb16624f34600069bb5d3540960b25176381.tar.gz |
Validate MR branch names
Prevents refspec as branch name, which would bypass branch protection
when used in conjunction with rebase.
HEAD seems to be a special case with lots of occurrence,
so it is considered valid for now.
Another special case is `refs/head/*`, which can be imported.
Diffstat (limited to 'spec/lib/gitlab/bitbucket_import')
-rw-r--r-- | spec/lib/gitlab/bitbucket_import/importer_spec.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/lib/gitlab/bitbucket_import/importer_spec.rb b/spec/lib/gitlab/bitbucket_import/importer_spec.rb index e1a2bae5fe8..fbe87aaefa1 100644 --- a/spec/lib/gitlab/bitbucket_import/importer_spec.rb +++ b/spec/lib/gitlab/bitbucket_import/importer_spec.rb @@ -5,6 +5,7 @@ describe Gitlab::BitbucketImport::Importer do before do stub_omniauth_provider('bitbucket') + stub_feature_flags(stricter_mr_branch_name: false) end let(:statuses) do |