Actions
Bug #14224
closed[Bug][Running a workflow] Correct shell quoting in command modal
Story points:
1.0
Release:
Release relationship:
Auto
Description
Each element of the command array in a container request is one argument to exec, even if it contains spaces. Joining the elements with a space separator loses the distinction between spaces in arguments and spaces between arguments.
Suggest shell-quoting/escaping array elements that contain spaces and other special characters, to produce a string that is unambiguous and can be pasted into a shell prompt.
Examples:
command (JSON-encoded) | one possible shell-escaped version | output |
["sh", "-c", "echo $0", "OK"] |
sh -c "echo \$0" OK |
OK |
["sh", "-c", "echo $(printf %s \"'\"'\"'\\\\ | md5sum | head -c8)"] |
sh -c echo\ \$\(printf\ %s\ \"\'\"\'\"\'\\\\\ \|\ md5sum\ \|\ head\ -c8\) |
9a33fb47 |
["sh", "-c", "echo $(printf %s \"'\"'\"'\\\\ | md5sum | head -c8)"] |
sh -c $'echo $(printf %s \"\'\"\'\"\'\\\\ | md5sum | head -c8)' |
9a33fb47 |
["echo", "*\u0009*"] |
echo '*\t*' |
* * |
Updated by Chrystian Klingenberg over 6 years ago
- Target version set to sprint 9
Updated by Michał Kłobukowski over 6 years ago
- Status changed from New to In Progress
- Assigned To set to Michał Kłobukowski
Updated by Michał Kłobukowski over 6 years ago
- Status changed from In Progress to Resolved
Updated by Michal Komorowski about 6 years ago
- Status changed from Resolved to Closed
Actions