Skip to content
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

Escape commands passed to run and execute #37

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

stnguyen90
Copy link

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 stnguyen90 force-pushed the fix-command-escaping branch from d9b1277 to 2c20647 Compare March 12, 2024 20:51
@stnguyen90 stnguyen90 requested a review from abnegate March 12, 2024 20:51
@stnguyen90 stnguyen90 force-pushed the fix-command-escaping branch 5 times, most recently from fa29780 to db2bdc3 Compare March 12, 2024 22:21
@stnguyen90 stnguyen90 marked this pull request as draft March 22, 2024 17:44
@stnguyen90
Copy link
Author

Need to fix tests.

@stnguyen90 stnguyen90 force-pushed the fix-command-escaping branch from db2bdc3 to 450018e Compare May 10, 2024 20:37
@stnguyen90
Copy link
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 stnguyen90 force-pushed the fix-command-escaping branch 13 times, most recently from a6b4bc9 to aeb9b9a Compare May 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 stnguyen90 force-pushed the fix-command-escaping branch from aeb9b9a to 09a11a3 Compare May 10, 2024 23:41
@stnguyen90 stnguyen90 force-pushed the fix-command-escaping branch from 1eb3c7c to bca3cfc Compare May 13, 2024 23:19
Sign up for free to 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