Skip to content

Commit

Permalink
Исправление ошибки отдачи файлов с пробелами в названии
Browse files Browse the repository at this point in the history
  • Loading branch information
JoCat authored and Andrey Molchanov committed Jun 17, 2024
1 parent b95e8bd commit 6dcd632
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class WebServerManager {
url = url.replace(/\/{2,}/g, "/").slice(6);
if (url.at(-1) === "/") url = url.slice(0, -1);

const path = join(StorageHelper.gameFilesDir, url);
const path = join(StorageHelper.gameFilesDir, decodeURIComponent(url));

// Защита от выхода из директории
if (!path.startsWith(StorageHelper.gameFilesDir)) {
Expand Down

0 comments on commit 6dcd632

Please sign in to comment.