mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 16:14:40 +00:00
Mvc/Router - normalize multiple leading slashes in paths, closes https://github.com/opnsense/core/issues/7709
This commit is contained in:
parent
01fc795f34
commit
b26bbd34dd
@ -115,7 +115,7 @@ class Router
|
||||
*/
|
||||
public function routeRequest(string $uri, array $defaults = []): Response
|
||||
{
|
||||
$path = parse_url($uri)['path'];
|
||||
$path = parse_url('/'.ltrim($uri, '/'))['path'] ?? '';
|
||||
|
||||
if (!str_starts_with($path, $this->prefix)) {
|
||||
throw new InvalidUriException("Invalid route path: " . $uri);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user