Fixed this thing being a layer up too high.

This commit is contained in:
flash 2025-04-03 19:42:43 +00:00
parent 83068a4183
commit 155b301405
Signed by: flash
GPG key ID: 2C9C2C574D47FE3E

View file

@ -38,6 +38,10 @@ if($msz->routingCtx->domainRoles->hasRole($request->getHeaderLine('Host'), 'main
if(str_starts_with($mszLegacyPath, $mszLegacyPathPrefix)) {
$mszLegacyPathReal = realpath($mszLegacyPath);
if($mszLegacyPath === $mszLegacyPathReal || $mszLegacyPath === $mszLegacyPathReal . '/') {
if(is_dir($mszLegacyPath))
$mszLegacyPath .= '/index.php';
if(is_file($mszLegacyPath)) {
// this is here so filters can run...
$msz->routingCtx->router->route(RouteInfo::exact(
$request->method,
@ -54,10 +58,6 @@ if($msz->routingCtx->domainRoles->hasRole($request->getHeaderLine('Host'), 'main
exit;
}
if(is_dir($mszLegacyPath))
$mszLegacyPath .= '/index.php';
if(is_file($mszLegacyPath)) {
// Reconstruct $_POST since PHP no longer makes it for us
if($request->getBody()->isReadable() && empty($_POST)) {
$mszRequestContent = (function($contentType, $stream) {