From 66c1ceb7ce1e490cc588026ea4df46f682d97e92 Mon Sep 17 00:00:00 2001 From: Furox Date: Sat, 5 Sep 2026 01:12:01 +0300 Subject: [PATCH] fix: redact SFTP key passphrases --- packages/server/src/utils/backups/redact.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/server/src/utils/backups/redact.ts b/packages/server/src/utils/backups/redact.ts index fd4f62c50..d1d673d29 100644 --- a/packages/server/src/utils/backups/redact.ts +++ b/packages/server/src/utils/backups/redact.ts @@ -1,12 +1,11 @@ /** * Redacts credentials from rclone command strings before they reach logs or * user-facing error output. Handles both the existing S3 flags and the - * provider-specific FTP/SFTP password flags generated by the destination - * builder. + * provider-specific FTP/SFTP credential flags used by backup destinations. */ export const redactRcloneCredentials = (command: string): string => { return command.replace( - /(--(?:s3-access-key-id|s3-secret-access-key|ftp-pass|sftp-pass)=)(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|[^\s]+)/g, + /(--(?: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