diff --git a/system/request.php b/system/request.php index 671de97b..dd3be314 100644 --- a/system/request.php +++ b/system/request.php @@ -36,7 +36,12 @@ public static function uri() // ------------------------------------------------------- elseif (isset($_SERVER['REQUEST_URI'])) { - $uri = str_replace('/index.php', '', $_SERVER['REQUEST_URI']); + $uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); + + if ($uri === false) + { + throw new \Exception("Malformed request URI. Request terminated."); + } } // ------------------------------------------------------- // Neither PATH_INFO or REQUEST_URI are available.