Skip to content
Snippets Groups Projects
Commit 79ac7a64 authored by Helmut Hummel's avatar Helmut Hummel Committed by Benni Mack
Browse files

[BUGFIX] Avoid double encoding of routes

The routing introduced in #65493 double encodes the routes for no reasons
Remove the double encoding and decoding.
Also improve type hints in the Router class

Resolves: #68828
Releases: master
Change-Id: I2576b122396280f87f75cb73ac38932936391d66
Reviewed-on: http://review.typo3.org/42355


Reviewed-by: default avatarMathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: default avatarMathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarBenni Mack <benni@typo3.org>
parent 1ea0a7dd
No related merge requests found
......@@ -36,7 +36,7 @@ class Router implements \TYPO3\CMS\Core\SingletonInterface {
/**
* All routes used in the Backend
*
* @var array|null
* @var Route[]
*/
protected $routes = array();
......@@ -53,7 +53,7 @@ class Router implements \TYPO3\CMS\Core\SingletonInterface {
/**
* Fetch all registered routes, only use in UriBuilder
*
* @return array|null
* @return Route[]
*/
public function getRoutes() {
return $this->routes;
......@@ -67,7 +67,6 @@ class Router implements \TYPO3\CMS\Core\SingletonInterface {
* @throws ResourceNotFoundException If the resource could not be found
*/
public function match($pathInfo) {
$pathInfo = rawurldecode($pathInfo);
foreach ($this->routes as $routeIdentifier => $route) {
// This check is done in a simple way as there are no parameters yet (get parameters only)
if ($route->getPath() === $pathInfo) {
......
......@@ -82,7 +82,7 @@ class UriBuilder {
// Add the Route path as &route=XYZ
$parameters = array(
'route' => rawurlencode($route->getPath())
'route' => $route->getPath()
) + $parameters;
return $this->buildUri($parameters, $referenceType);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment