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
path: root/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-06-29 17:12:19 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-06-29 17:12:34 +0300
commit451b22ae6be7923933c9de561ef06e1124649bc0 (patch)
tree9c686088cc5dc5d40411ea01410e41269c6c0149 /lib
parent222fda90362a3be9e54323af32234d038b99908d (diff)
Add latest changes from gitlab-org/security/gitlab@15-1-stable-ee
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/jira/dvcs.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/jira/dvcs.rb b/lib/gitlab/jira/dvcs.rb
index ddf2cd76709..41a039674b3 100644
--- a/lib/gitlab/jira/dvcs.rb
+++ b/lib/gitlab/jira/dvcs.rb
@@ -38,7 +38,8 @@ module Gitlab
# @param [String] namespace
def self.restore_full_path(namespace:, project:)
if project.include?(ENCODED_SLASH)
- project.gsub(ENCODED_SLASH, SLASH)
+ # Replace multiple slashes with single ones to make sure the redirect stays on the same host
+ project.gsub(ENCODED_SLASH, SLASH).gsub(%r{\/{2,}}, '/')
else
"#{namespace}/#{project}"
end