Fixed chat routes being broken.
This commit is contained in:
parent
67d9620037
commit
4322f2561c
2 changed files with 11 additions and 12 deletions
4
composer.lock
generated
4
composer.lock
generated
|
@ -414,7 +414,7 @@
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.flash.moe/flash/index.git",
|
"url": "https://git.flash.moe/flash/index.git",
|
||||||
"reference": "405724ec3f9f9f2fb318c5a1d9db175e1b99c382"
|
"reference": "f71f3fcf9eb916420f3e8217f99e616149aedc76"
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"ext-mbstring": "*",
|
"ext-mbstring": "*",
|
||||||
|
@ -452,7 +452,7 @@
|
||||||
],
|
],
|
||||||
"description": "Composer package for the common library for my projects.",
|
"description": "Composer package for the common library for my projects.",
|
||||||
"homepage": "https://railgun.sh/index",
|
"homepage": "https://railgun.sh/index",
|
||||||
"time": "2023-09-11T20:08:15+00:00"
|
"time": "2023-09-11T20:34:16+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "flashwave/sasae",
|
"name": "flashwave/sasae",
|
||||||
|
|
|
@ -137,18 +137,17 @@ $mszLegacyPath = $mszLegacyPathPrefix . $mszRequestPath;
|
||||||
|
|
||||||
if(!empty($mszLegacyPath) && str_starts_with($mszLegacyPath, $mszLegacyPathPrefix)) {
|
if(!empty($mszLegacyPath) && str_starts_with($mszLegacyPath, $mszLegacyPathPrefix)) {
|
||||||
$mszLegacyPathReal = realpath($mszLegacyPath);
|
$mszLegacyPathReal = realpath($mszLegacyPath);
|
||||||
if($mszLegacyPath !== $mszLegacyPathReal && $mszLegacyPath !== $mszLegacyPathReal . '/')
|
if($mszLegacyPath === $mszLegacyPathReal || $mszLegacyPath === $mszLegacyPathReal . '/') {
|
||||||
Template::throwError(404);
|
if(str_starts_with($mszRequestPath, '/manage') && !$msz->hasManageAccess())
|
||||||
|
Template::throwError(403);
|
||||||
|
|
||||||
if(str_starts_with($mszRequestPath, '/manage') && !$msz->hasManageAccess())
|
if(is_dir($mszLegacyPath))
|
||||||
Template::throwError(403);
|
$mszLegacyPath .= '/index.php';
|
||||||
|
|
||||||
if(is_dir($mszLegacyPath))
|
if(is_file($mszLegacyPath)) {
|
||||||
$mszLegacyPath .= '/index.php';
|
require_once $mszLegacyPath;
|
||||||
|
return;
|
||||||
if(is_file($mszLegacyPath)) {
|
}
|
||||||
require_once $mszLegacyPath;
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue