From d485afdf27ebfb2fd464af24f483069a7d20be42 Mon Sep 17 00:00:00 2001 From: Laetitia Fesselier Date: Mon, 14 Jun 2021 12:46:34 -0400 Subject: [PATCH] [API] urldecode visit label from url (#7478) Handle characters that must be urlencoded (such as a space) in the API path for visit labels. --- modules/api/php/endpoints/candidate/candidate.class.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/api/php/endpoints/candidate/candidate.class.inc b/modules/api/php/endpoints/candidate/candidate.class.inc index 16fbd5d44d3..b76cc3b87b3 100644 --- a/modules/api/php/endpoints/candidate/candidate.class.inc +++ b/modules/api/php/endpoints/candidate/candidate.class.inc @@ -95,7 +95,7 @@ class Candidate extends Endpoint implements \LORIS\Middleware\ETagCalculator } // Delegate to sub-endpoints - $visit_label = array_shift($pathparts); + $visit_label = urldecode(array_shift($pathparts)); $newrequest = $request ->withAttribute('pathparts', $pathparts);