Add single quotes for inner command.

Change to bash as interpreter.
Forbid single quotes for user commands.
This commit is contained in:
Maximilian Paß
2022-10-21 16:52:22 +01:00
committed by Sebastian Serth
parent 4c25473c9e
commit 8950ab3776
8 changed files with 70 additions and 48 deletions

View File

@ -37,7 +37,7 @@ func (er *ExecutionRequest) FullCommand() []string {
for variable, value := range er.Environment {
command = append(command, fmt.Sprintf("%s=%s", variable, value))
}
command = append(command, "sh", "-c", er.Command)
command = append(command, "bash", "-c", er.Command)
return command
}