Mvc/Router - normalize multiple slashes in paths, closes https://github.com/opnsense/core/issues/7709

This commit is contained in:
Ad Schellevis 2024-11-27 20:52:03 +01:00
parent eded37411f
commit 0ebd95476a

View File

@ -165,7 +165,8 @@ class Router
*/
private function parsePath(string $path, array $defaults): array
{
$pathElements = explode("/", rtrim($path, '/'));
$pathElements = array_values(array_filter(explode("/", $path)));
$result = [
"namespace" => null,
"controller" => null,