Skip to content

Commit

Permalink
Prevent command execution by substituting ` for ' (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanchancey authored Sep 15, 2021
1 parent d8bc5ef commit 68706f7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ fi

header=$'Here are some friendly prose warnings from [`write-good`](https://github.com/btford/write-good):\n'

# prevent command execution by substituting ` for '
result=$(echo "$result" | sed "s/\`/'/g")

result=$header$'```\n'$result$'\n```'

# add support for multiline output
Expand Down

0 comments on commit 68706f7

Please sign in to comment.