From 5049abd550c194662f713d19cf5c9a3a5fce0138 Mon Sep 17 00:00:00 2001 From: Jeff Fearn Date: Fri, 8 Apr 2022 12:51:30 +1000 Subject: Bug 2073237 - GitLab pull doesn't support nested projects uri_encode user suplied components of url. Change-Id: I9742192b6cfb32e352676ca512baa2be9faf5e2a --- extensions/ExternalBugs/lib/Type/GitLab.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extensions/ExternalBugs/lib/Type/GitLab.pm b/extensions/ExternalBugs/lib/Type/GitLab.pm index 3736184d9..5dbd28184 100644 --- a/extensions/ExternalBugs/lib/Type/GitLab.pm +++ b/extensions/ExternalBugs/lib/Type/GitLab.pm @@ -19,6 +19,7 @@ use JSON; use URI; use LWP::UserAgent; use HTTP::Request; +use URI::Escape; use constant TYPE => 'GitLab'; @@ -41,6 +42,9 @@ sub get_data { my ($group, $project, $number) = ($ext_bug->ext_bz_bug_id =~ m{^(.*)/(.*)/-/(?:issues|merge_requests)/(.*)}); + $group = uri_escape_utf8($group); + $project = uri_escape_utf8($project); + $number = uri_escape_utf8($number); ThrowUserError("ext_bz_cant_sync_id", {badvalue => $ext_bug->ext_bz_bug_id, et_type => TYPE}) -- cgit v1.2.3-65-gdbad