diff --git a/apps/dokploy/__test__/utils/issue-416-path-safety.test.ts b/apps/dokploy/__test__/utils/issue-416-path-safety.test.ts index 028e48003..a955022e1 100644 --- a/apps/dokploy/__test__/utils/issue-416-path-safety.test.ts +++ b/apps/dokploy/__test__/utils/issue-416-path-safety.test.ts @@ -1,9 +1,9 @@ import { RCLONE_DESTINATION_PROVIDERS } from "@dokploy/server/db/validations/destination"; +import { redactRcloneCredentials } from "@dokploy/server/utils/backups/redact"; import { assertSafeRclonePath, getRclonePathAndFlags, } from "@dokploy/server/utils/backups/utils"; -import { redactRcloneCredentials } from "@dokploy/server/utils/backups/redact"; import { describe, expect, test } from "vitest"; const destination = (overrides: Record = {}) => @@ -68,4 +68,4 @@ describe("issue #416 credential redaction", () => { expect(redacted).not.toContain("obscured-secret"); expect(redacted).toContain('--sftp-key-file-pass="[REDACTED]"'); }); -}); \ No newline at end of file +}); diff --git a/packages/server/src/utils/backups/redact.ts b/packages/server/src/utils/backups/redact.ts index d1d673d29..b7ff17158 100644 --- a/packages/server/src/utils/backups/redact.ts +++ b/packages/server/src/utils/backups/redact.ts @@ -8,4 +8,4 @@ export const redactRcloneCredentials = (command: string): string => { /(--(?:s3-access-key-id|s3-secret-access-key|ftp-pass|sftp-pass|sftp-key-file-pass)=)(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|[^\s]+)/g, '$1"[REDACTED]"', ); -}; \ No newline at end of file +}; diff --git a/packages/server/src/utils/backups/utils.ts b/packages/server/src/utils/backups/utils.ts index 113250bef..4c3578505 100644 --- a/packages/server/src/utils/backups/utils.ts +++ b/packages/server/src/utils/backups/utils.ts @@ -416,4 +416,4 @@ export const getBackupCommand = ( echo "[$(date)] ✅ Backup uploaded successfully" >> ${logPath}; echo "Backup done ✅" >> ${logPath}; `; -}; \ No newline at end of file +};