fix: prevent command injection via docker options eval
Values supplied through docker options, `--ttl-seconds`, and `-e` flowed into a Bash `eval` during build, deploy, and run, letting a low-privileged user execute arbitrary commands on the host as the dokku user. These arguments are now tokenized and passed through to the container verbatim, without shell expansion. A one-time migration repairs stored labels whose backticks were saved with a stray backslash so Traefik-style rules stay valid on the next deploy.
This commit is contained in:
25 files changed
+444
-29
No files matched your search
@@ -20,6 +20,10 @@ func TriggerInstall() error {
|
||||
return fmt.Errorf("Unable to migrate legacy docker-options files: %v", err)
|
||||
}
|
||||
|
||||
if err := migrateTraefikLabelBackticks(); err != nil {
|
||||
return fmt.Errorf("Unable to repair docker-options label backticks: %v", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user