mirror of
https://github.com/dokploy/dokploy.git
synced 2026-06-14 03:19:49 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user