Fix of error 500 with many sequential slashes in URL (#15)

This commit is contained in:
n1rwana 2023-08-11 02:07:20 +03:00 committed by GitHub
parent b46c33d5b8
commit 73eeaa8b3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -278,7 +278,7 @@ class Router
function execute(string $url, ?string $parentModule = null): ?string
{
$this->scope = [];
$this->url = chandler_escape_url(parse_url($url, PHP_URL_PATH));
$this->url = chandler_escape_url((string) parse_url(preg_replace("%/+%", "/", $url), PHP_URL_PATH));
if(!is_null($parentModule)) {
$GLOBALS["parentModule"] = $parentModule;