summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/psalm-baseline.xml3
-rw-r--r--lib/private/AppFramework/Http/Request.php12
2 files changed, 3 insertions, 12 deletions
diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml
index 863226922d8..94c7e0a5b40 100644
--- a/build/psalm-baseline.xml
+++ b/build/psalm-baseline.xml
@@ -2542,7 +2542,8 @@
<RedundantCondition occurrences="1">
<code>\is_array($params)</code>
</RedundantCondition>
- <UndefinedFunction occurrences="1">
+ <UndefinedFunction occurrences="2">
+ <code>\Sabre\HTTP\decodePath($pathInfo)</code>
<code>\Sabre\Uri\split($scriptName)</code>
</UndefinedFunction>
</file>
diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php
index f896b825f2d..010d889070e 100644
--- a/lib/private/AppFramework/Http/Request.php
+++ b/lib/private/AppFramework/Http/Request.php
@@ -784,17 +784,7 @@ class Request implements \ArrayAccess, \Countable, IRequest {
*/
public function getPathInfo() {
$pathInfo = $this->getRawPathInfo();
- // following is taken from \Sabre\HTTP\URLUtil::decodePathSegment
- $pathInfo = rawurldecode($pathInfo);
- $encoding = mb_detect_encoding($pathInfo, ['UTF-8', 'ISO-8859-1']);
-
- switch ($encoding) {
- case 'ISO-8859-1':
- $pathInfo = utf8_encode($pathInfo);
- }
- // end copy
-
- return $pathInfo;
+ return \Sabre\HTTP\decodePath($pathInfo);
}
/**