diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
commit | a7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch) | |
tree | 7452bd5c3545c2fa67a28aa013835fb4fa071baf /lib/extracts_path.rb | |
parent | ee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff) |
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'lib/extracts_path.rb')
-rw-r--r-- | lib/extracts_path.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/extracts_path.rb b/lib/extracts_path.rb index 8f6576c2206..db5c3bb1d4a 100644 --- a/lib/extracts_path.rb +++ b/lib/extracts_path.rb @@ -16,6 +16,8 @@ module ExtractsPath id_without_atom = id.sub(/\.atom$/, '') valid_refs = ref_names.select { |v| "#{id_without_atom}/".start_with?("#{v}/") } + raise InvalidPathError if valid_refs.blank? + valid_refs.max_by(&:length) end |