-
Notifications
You must be signed in to change notification settings - Fork 53.3k
fix(core): Sanitize filenames for file operations #23988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
fix(core): Sanitize filenames for file operations #23988
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 6 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="packages/nodes-base/nodes/Ssh/Ssh.node.ts">
<violation number="1" location="packages/nodes-base/nodes/Ssh/Ssh.node.ts:452">
P1: Using `??` instead of `||` causes a regression: when `fileName` is an empty string (the default from `getNodeParameter`), it won't fall back to `binaryData.fileName`. The `??` operator only coalesces `null`/`undefined`, not empty strings. This will result in uploads to paths like `/home/user/` instead of `/home/user/filename.txt`.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
c6ffa91 to
cae3955
Compare
|
E2E Tests: n8n tests passed after 12m 41.8s Run Details
Groups
This message was posted automatically by
currents.dev | Integration Settings
|
Summary
Improve sanitization for file names.
Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/NODE-4175/
Review / Merge checklist
release/backport(if the PR is an urgent fix that needs to be backported)