summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/git_ref_validator_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/gitlab@13-2-stable-eeGitLab Bot2020-07-201-1/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-02-061-2/+2
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-11-081-0/+2
|
* Refactor spec to not use truthy or falseyMark Chao2019-05-031-58/+58
|
* Validate MR branch namesMark Chao2019-05-031-27/+65
| | | | | | | | | | 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.
* Gracefully handle references with null bytesStan Hu2018-11-261-0/+1
| | | | | | | | | | | | | | `Rugged::Reference.valid_name?` used in `Gitlab::GitRefValidator.validate` fails on strings containing null bytes because it uses `StringValueCStr()`. Per https://silverhammermba.github.io/emberb/c/: Ruby’s String kinda corresponds to C’s char*. The simplest macro is StringValueCStr() which returns a null-terminated char* for a String. The problem here is that a Ruby String might contain nulls - in which case StringValueCStr() will raise an ArgumentError! Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/54466
* Prevent branches or tags from starting with invalid characters (e.g. -, .)valid-branch-name-dash-bugJacob Schatz2017-10-051-0/+5
| | | | Closes #38817
* Use described_class when possibleRémy Coutable2017-07-271-21/+21
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Remove superfluous lib: true, type: redis, service: true, models: true, ↵Rémy Coutable2017-07-271-1/+1
| | | | | | services: true, no_db: true, api: true Signed-off-by: Rémy Coutable <remy@rymai.me>
* Enable RSpec/FilePath copenable-spec-file-name-copSean McGivern2017-04-261-0/+25
- Ignore JS fixtures - Ignore qa directory - Rewrite concern specs to put concern name first