File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
lib/private/AppFramework/Http Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change 5050use OCP \IRequest ;
5151use OCP \IRequestId ;
5252use OCP \Security \ICrypto ;
53+ use function Sabre \HTTP \decodePathSegment ;
5354
5455/**
5556 * Class for accessing variables in the request.
@@ -784,17 +785,7 @@ public function getRawPathInfo(): string {
784785 */
785786 public function getPathInfo () {
786787 $ pathInfo = $ this ->getRawPathInfo ();
787- // following is taken from \Sabre\HTTP\URLUtil::decodePathSegment
788- $ pathInfo = rawurldecode ($ pathInfo );
789- $ encoding = mb_detect_encoding ($ pathInfo , ['UTF-8 ' , 'ISO-8859-1 ' ]);
790-
791- switch ($ encoding ) {
792- case 'ISO-8859-1 ' :
793- $ pathInfo = utf8_encode ($ pathInfo );
794- }
795- // end copy
796-
797- return $ pathInfo ;
788+ return decodePathSegment ($ pathInfo );
798789 }
799790
800791 /**
You can’t perform that action at this time.
0 commit comments