Skip to content
Browse files

_Trailing_ and $this->keys also do not need to be urldecoded. Both _t…

…railing_ and $this->keys gets set in _writeRoute, which also makes the regex that used to create the array $route.

Any keys in $route that match [_trailing_] or any values in $this->keys are put there through the exection of preg_match. The URL is decoded before being passed to preg_match, which means the values
inside of [_trailing_]etc. have already been decoded.
  • Loading branch information... committed Jan 24, 2014
1 parent 83f37e4 commit 7f496fad9431f7d01be7721b3c1ef352d932c506
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Cake/Routing/Route/CakeRoute.php
@@ -235,7 +235,7 @@ public function parse($url) {
foreach ($this->keys as $key) {
if (isset($route[$key])) {
$route[$key] = rawurldecode($route[$key]);
$route[$key] = $route[$key];
@@ -247,7 +247,7 @@ public function parse($url) {
if (isset($route['_trailing_'])) {
$route['pass'][] = rawurldecode($route['_trailing_']);
$route['pass'][] = $route['_trailing_'];

0 comments on commit 7f496fa

Please sign in to comment.
You can’t perform that action at this time.