Skip to content

Commit

Permalink
merged branch Tobion/fix-double-encoding (PR #6363)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.0 branch.

Commits
-------

8b2c17f fix double-decoding in the routing system

Discussion
----------

fix double-decoding in the routing system

@fabpot @vicb This should fix it. You know what ;) Don't want to leak more information.
And the good thing, it's no hack nor does it break BC.
  • Loading branch information
fabpot committed Dec 20, 2012
2 parents 75afdfe + 6e2698d commit 6319bda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Http/HttpUtils.php
Expand Up @@ -107,7 +107,7 @@ public function checkRequestPath(Request $request, $path)
{
if ('/' !== $path[0]) {
try {
$parameters = $this->router->match($request->getPathInfo());
$parameters = $this->router->match(urlencode($request->getPathInfo()));

return $path === $parameters['_route'];
} catch (MethodNotAllowedException $e) {
Expand All @@ -129,7 +129,7 @@ private function resetLocale(Request $request)
}

try {
$parameters = $this->router->match($request->getPathInfo());
$parameters = $this->router->match(urlencode($request->getPathInfo()));

if (isset($parameters['_locale'])) {
$context->setParameter('_locale', $parameters['_locale']);
Expand Down

0 comments on commit 6319bda

Please sign in to comment.