feat(deployment): enhance log retrieval by encoding log path in base64

- Updated the WebSocket server to encode the log path in base64 before executing the tail command on the remote server.
- Added validation to ensure the directory name adheres to a specified regex pattern, improving input integrity for directory paths.
This commit is contained in:
Mauricio Siu
2026-05-09 00:01:45 -06:00
parent 06a349152f
commit a4e2317f3e
2 changed files with 8 additions and 3 deletions
+4
View File
@@ -40,6 +40,10 @@ export const readValidDirectory = (
directory: string,
serverId?: string | null,
) => {
if (!/^[\w/. -]{1,500}$/.test(directory)) {
return false;
}
const { BASE_PATH } = paths(!!serverId);
const resolvedBase = path.resolve(BASE_PATH);