Skip to content

Escape commands passed to run and execute - #37

Draft
stnguyen90 wants to merge 2 commits into
mainfrom
fix-command-escaping
Draft

Escape commands passed to run and execute#37
stnguyen90 wants to merge 2 commits into
mainfrom
fix-command-escaping

Conversation

@stnguyen90

Copy link
Copy Markdown

Each element in commands should be treated as a single argument so we should escape it as an argument to prevent anything from breakint out to execute anything else.

@stnguyen90
stnguyen90force-pushed the fix-command-escaping branch 5 times, most recently from fa29780 to db2bdc3CompareMarch 12, 2024 22:21
@stnguyen90
stnguyen90 marked this pull request as draft March 22, 2024 17:44
@stnguyen90

Copy link
Copy Markdown
Author

Need to fix tests.

@stnguyen90
stnguyen90force-pushed the fix-command-escaping branch from db2bdc3 to 450018eCompareMay 10, 2024 20:37
@stnguyen90

Copy link
Copy Markdown
Author

The tests are probably failing because the 3rd command is being escaped:

$containerId1 = static::getOrchestration()->run(
'containerstack/alpine-stress', // https://github.com/containerstack/alpine-stress
'UsageStats1',
[
'sh',
'-c',
'apk update && apk add screen && tail -f /dev/null',
],

@stnguyen90
stnguyen90force-pushed the fix-command-escaping branch 13 times, most recently from a6b4bc9 to aeb9b9aCompareMay 10, 2024 23:39
Each element in commands should be treated as a single argument so
we should escape it as an argument to prevent anything from
breakint out to execute anything else.
@stnguyen90
stnguyen90force-pushed the fix-command-escaping branch from aeb9b9a to 09a11a3CompareMay 10, 2024 23:41
@stnguyen90
stnguyen90force-pushed the fix-command-escaping branch from 1eb3c7c to bca3cfcCompareMay 13, 2024 23:19
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@stnguyen90@abnegate