Skip to content

Commit df3207e

Browse files
committed
Route: percent-encoded bytes are decoded before URL is matched (BC break)
1 parent ecfda38 commit df3207e

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/Application/Routers/Route.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ class Route extends Nette\Object implements Application\IRouter
5656
public static $styles = array(
5757
'#' => array( // default style for path parameters
5858
self::PATTERN => '[^/]+',
59-
self::FILTER_IN => 'rawurldecode',
6059
self::FILTER_OUT => array(__CLASS__, 'param2path'),
6160
),
6261
'?#' => array( // default style for query parameters
@@ -171,7 +170,7 @@ public function match(Nette\Http\IRequest $httpRequest)
171170
}
172171

173172
if ($path !== '') {
174-
$path = rtrim($path, '/') . '/';
173+
$path = rtrim(rawurldecode($path), '/') . '/';
175174
}
176175

177176
if (!$matches = Strings::match($path, $re)) {

0 commit comments

Comments
 (0)