Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-11-10 02:31:26 +0300
committerStan Hu <stanhu@gmail.com>2018-11-10 02:36:45 +0300
commit39f252254b535e58fe50e722a4ba5d95b17fc90d (patch)
treedd7312cab3c2f07247112c852ea92c205a21c2c0 /lib/gitlab/manifest_import
parent4aa41d07e16ca03f5f56b7cc5c136d86d51666c2 (diff)
Make sure there's only one slash as path separator
In Ruby 2.4, `URI.join("http://test//", "a").to_s` will remove the double slash, however it's not the case in Ruby 2.5. Using chomp should work better for the intention, as we're not trying to allow things like ../ or / paths resolution. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53180
Diffstat (limited to 'lib/gitlab/manifest_import')
-rw-r--r--lib/gitlab/manifest_import/manifest.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/manifest_import/manifest.rb b/lib/gitlab/manifest_import/manifest.rb
index 4d6034fb956..b69b9ac4b64 100644
--- a/lib/gitlab/manifest_import/manifest.rb
+++ b/lib/gitlab/manifest_import/manifest.rb
@@ -63,7 +63,7 @@ module Gitlab
end
def repository_url(name)
- URI.join(remote, name).to_s
+ Gitlab::Utils.append_path(remote, name)
end
def remote