Commit graph

5 commits

Author SHA1 Message Date
Stan Hu
e36c347ff9 Gracefully handle references with null bytes
`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
2018-11-26 14:14:16 -08:00
Jacob Schatz
351fde1b90 Prevent branches or tags from starting with invalid characters (e.g. -, .)
Closes #38817
2017-10-05 14:56:36 -07:00
Rémy Coutable
cddc5cacfb Use described_class when possible
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02:00
Rémy Coutable
ddccd24c13 Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02:00
Sean McGivern
5069682d8e Enable RSpec/FilePath cop
- Ignore JS fixtures
- Ignore qa directory
- Rewrite concern specs to put concern name first
2017-04-26 12:50:32 +01:00
Renamed from spec/lib/git_ref_validator_spec.rb (Browse further)