Fixed chat routes being broken.

This commit is contained in:
flash 2023-09-11 20:36:20 +00:00
parent 67d9620037
commit 4322f2561c
2 changed files with 11 additions and 12 deletions

4
composer.lock generated
View file

@ -414,7 +414,7 @@
"source": {
"type": "git",
"url": "https://git.flash.moe/flash/index.git",
"reference": "405724ec3f9f9f2fb318c5a1d9db175e1b99c382"
"reference": "f71f3fcf9eb916420f3e8217f99e616149aedc76"
},
"require": {
"ext-mbstring": "*",
@ -452,7 +452,7 @@
],
"description": "Composer package for the common library for my projects.",
"homepage": "https://railgun.sh/index",
"time": "2023-09-11T20:08:15+00:00"
"time": "2023-09-11T20:34:16+00:00"
},
{
"name": "flashwave/sasae",

View file

@ -137,9 +137,7 @@ $mszLegacyPath = $mszLegacyPathPrefix . $mszRequestPath;
if(!empty($mszLegacyPath) && str_starts_with($mszLegacyPath, $mszLegacyPathPrefix)) {
$mszLegacyPathReal = realpath($mszLegacyPath);
if($mszLegacyPath !== $mszLegacyPathReal && $mszLegacyPath !== $mszLegacyPathReal . '/')
Template::throwError(404);
if($mszLegacyPath === $mszLegacyPathReal || $mszLegacyPath === $mszLegacyPathReal . '/') {
if(str_starts_with($mszRequestPath, '/manage') && !$msz->hasManageAccess())
Template::throwError(403);
@ -151,5 +149,6 @@ if(!empty($mszLegacyPath) && str_starts_with($mszLegacyPath, $mszLegacyPathPrefi
return;
}
}
}
$router->dispatch($request);