Skip to content

Commit 4abc3aa

Browse files
authored
Merge pull request #33 from open-runtimes/feat-add-escapes
2 parents e609f20 + 19a4e40 commit 4abc3aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/http.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ function removeAllRuntimes(Table $activeRuntimes, Pool $orchestrationPool): void
286286
// Wait for runtime
287287
for ($i = 0; $i < 10; $i++) {
288288
$output = '';
289-
$code = Console::execute('docker container inspect ' . $runtimeId, '', $output);
289+
$code = Console::execute('docker container inspect ' . \escapeshellarg($runtimeId), '', $output);
290290
if ($code === 0) {
291291
break;
292292
}
@@ -325,7 +325,7 @@ function removeAllRuntimes(Table $activeRuntimes, Pool $orchestrationPool): void
325325
});
326326

327327
$output = '';
328-
Console::execute('docker exec ' . $runtimeId . ' tail -F /var/tmp/logs.txt', '', $output, $timeout, function (string $outputChunk, mixed $process) use (&$logsChunk, &$logsProcess) {
328+
Console::execute('docker exec ' . \escapeshellarg($runtimeId) . ' tail -F /var/tmp/logs.txt', '', $output, $timeout, function (string $outputChunk, mixed $process) use (&$logsChunk, &$logsProcess) {
329329
$logsProcess = $process;
330330

331331
if (!empty($outputChunk)) {

0 commit comments

Comments
 (0)