diff options
author | Douwe Maan <douwe@gitlab.com> | 2019-03-14 13:05:18 +0300 |
---|---|---|
committer | GitLab Release Tools Bot <robert+release-tools@gitlab.com> | 2019-03-15 01:42:18 +0300 |
commit | a26a5aff497a793c8089a41fd1aede6818d0440c (patch) | |
tree | f052ff790bba5ed5ed85ff51be00a19d99b4b0f1 /app | |
parent | 6a7facfda78cec05d75a39a2f5a10572ea36027a (diff) |
Merge branch 'fj-58804-fix-bitbucket-import' into 'master'
Fix Bitbucket import
Closes #58804
See merge request gitlab-org/gitlab-ce!26050
(cherry picked from commit 516987e4ba40bffa68a1060efd901af2f1e6a3c3)
e4663942 Fix Bitbucket import
a89851e7 Added changelog to MR
b5b9925e Removing SHA length validation
4268fc87 Added SHA length validation
2e2e3a8c Small replacement in spec to use a constant
Diffstat (limited to 'app')
-rw-r--r-- | app/validators/sha_validator.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/validators/sha_validator.rb b/app/validators/sha_validator.rb index 085fca4d65d..77e7cfa4f6b 100644 --- a/app/validators/sha_validator.rb +++ b/app/validators/sha_validator.rb @@ -2,7 +2,7 @@ class ShaValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) - return if value.blank? || value.match(/\A\h{40}\z/) + return if value.blank? || Commit.valid_hash?(value) record.errors.add(attribute, 'is not a valid SHA') end |