Skip to content

Commit

Permalink
fix: Commit messages aren't fully shell escaped
Browse files Browse the repository at this point in the history
`app` , "test", 'foo'

Signed-off-by: Minsu Lee <amond@amond.net>
  • Loading branch information
amondnet committed Jun 27, 2022
1 parent 8ed64b8 commit 13b5b55
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ async function vercelDeploy(ref, commit) {

const providedArgs = vercelArgs.split(/ +/);

const commitMessage = commit.replace("'", "'\\''");

const args = [
...vercelArgs.split(/ +/),
...['-t', vercelToken],
Expand All @@ -134,8 +136,7 @@ async function vercelDeploy(ref, commit) {
...addVercelMetadata('githubCommitRepo', context.repo.repo, providedArgs),
...addVercelMetadata(
'githubCommitMessage',
// eslint-disable-next-line prefer-template
'"' + commit + '"',
`'${commitMessage}'`,
providedArgs,
),
...addVercelMetadata(
Expand Down

0 comments on commit 13b5b55

Please sign in to comment.