Фикс ошибки 500 при нескольких слэшах в URL

This commit is contained in:
n1rwana 2023-08-10 00:50:43 +03:00
parent b46c33d5b8
commit 329c5e8c76
No known key found for this signature in database
GPG key ID: 184A60085ABF17D8

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;