-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Check for newlines and carriage return in artifact paths and name #951
Conversation
'some/invalid\rartifact/path', | ||
'some/invalid\nartifact/path', | ||
'some/invalid\r\nartifact/path', |
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.
New tests are here, I just moved everything into a separate file for better organization
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.
👍 Just some small comments/nits
Should we worry about file name length? A lot of common fs limit to 255 iirc
packages/artifact/src/internal/path-and-artifact-name-validation.ts
Outdated
Show resolved
Hide resolved
…tions#951) * Check for newlines and carriage return in artifact paths and name * Fix linting issue * Update comments * Add comment about spacing * Remove extra space
Enforce checking for newline characters and carriage returns in the artifact name and file paths that are uploaded
Will close out: actions/upload-artifact#183
utils.ts
)\\r
and\\n
For invalid artifact name: https://github.com/konradpabjan/artifact-test/actions/runs/1527098177
For invalid path: https://github.com/konradpabjan/artifact-test/actions/runs/1527052660