Updated Request::instance() to reduce multiple slashes to a single slash, and remove all dot-paths
This commit is contained in:
parent
977cc01071
commit
f9b461fe2f
|
@ -195,6 +195,12 @@ class Kohana_Request {
|
|||
}
|
||||
}
|
||||
|
||||
// Reduce multiple slashes to a single slash
|
||||
$uri = preg_replace('#//+#', '/', $uri);
|
||||
|
||||
// Remove all dot-paths from the URI, they are not valid
|
||||
$uri = preg_replace('#\.[\s./]*/#', '', $uri);
|
||||
|
||||
// Create the instance singleton
|
||||
Request::$instance = new Request($uri);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue