-
- Downloads
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.
Showing
- app/models/merge_request.rb 12 additions, 0 deletionsapp/models/merge_request.rb
- changelogs/unreleased/security-60039.yml 5 additions, 0 deletionschangelogs/unreleased/security-60039.yml
- lib/gitlab/git_ref_validator.rb 21 additions, 2 deletionslib/gitlab/git_ref_validator.rb
- spec/features/issuables/issuable_list_spec.rb 1 addition, 1 deletionspec/features/issuables/issuable_list_spec.rb
- spec/lib/gitlab/bitbucket_import/importer_spec.rb 1 addition, 0 deletionsspec/lib/gitlab/bitbucket_import/importer_spec.rb
- spec/lib/gitlab/git_ref_validator_spec.rb 65 additions, 27 deletionsspec/lib/gitlab/git_ref_validator_spec.rb
- spec/models/merge_request_spec.rb 36 additions, 0 deletionsspec/models/merge_request_spec.rb
- spec/services/ci/create_pipeline_service_spec.rb 3 additions, 3 deletionsspec/services/ci/create_pipeline_service_spec.rb
changelogs/unreleased/security-60039.yml
0 → 100644
Please register or sign in to comment