diff --git a/core/functions/session_proxy.php b/core/functions/session_proxy.php index 150cbe448e..0be92f67e3 100644 --- a/core/functions/session_proxy.php +++ b/core/functions/session_proxy.php @@ -270,6 +270,11 @@ private static function migrateLegacySessionIfNeeded($store): void */ private static function readLegacySessionPayload(string $sessionId): ?string { + // The cookie becomes part of a file name; Windows resolves "sess_\..\" even without a sess_ folder. + if (preg_match('/^[A-Za-z0-9,-]{1,256}$/', $sessionId) !== 1) { + return null; + } + $savePath = session_save_path(); if (!is_string($savePath) || $savePath === '') { $savePath = sys_get_temp_dir(); @@ -282,7 +287,7 @@ private static function readLegacySessionPayload(string $sessionId): ?string } $file = rtrim($path, "/\\") . DIRECTORY_SEPARATOR . 'sess_' . $sessionId; - if (!is_readable($file)) { + if (!is_file($file) || !is_readable($file)) { return null; } diff --git a/core/src/Services/Store/PackageInstallFlowService.php b/core/src/Services/Store/PackageInstallFlowService.php index d10c67c79b..f0d23bf3cf 100644 --- a/core/src/Services/Store/PackageInstallFlowService.php +++ b/core/src/Services/Store/PackageInstallFlowService.php @@ -239,7 +239,7 @@ private function buildDependencyErrorHtml(array $get): string
Before install ' . htmlspecialchars((string) ($get['name'] ?? '')) . '
Please install this packages:
' . implode('
', $arrDependencies) . '
Before install ' . htmlspecialchars((string) ($get['name'] ?? '')) . '
Please install this packages:
' . implode('
', array_map('htmlspecialchars', $arrDependencies)) . '