From c622a9dfc250bba1fb3a4a4928a3f61f743dbaec Mon Sep 17 00:00:00 2001 From: Hikkijp Date: Tue, 27 May 2014 17:30:38 -0300 Subject: [PATCH] Fixes bug #3581 Fixes bug #3581 and the issue noticed by markstory --- lib/Cake/Routing/Route/CakeRoute.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Cake/Routing/Route/CakeRoute.php b/lib/Cake/Routing/Route/CakeRoute.php index 74595c400..332aa804c 100644 --- a/lib/Cake/Routing/Route/CakeRoute.php +++ b/lib/Cake/Routing/Route/CakeRoute.php @@ -536,7 +536,11 @@ class CakeRoute { $out = str_replace($search, $replace, $out); } - if (strpos($this->template, '*')) { + if (strpos($this->template, '**')) { + $out = str_replace('**', $params['pass'], $out); + $out = str_replace('%2F', '/', $out); + } + elseif (strpos($this->template, '*')) { $out = str_replace('*', $params['pass'], $out); } $out = str_replace('//', '/', $out);