feat(libreoffice): SSRF guard for embedded external content

This commit is contained in:
Julien Neuhart
2026-04-28 18:02:13 +02:00
parent 64c28dd45e
commit 4998870723
7 changed files with 753 additions and 0 deletions

View File

@@ -55,6 +55,13 @@ func CommandContext(ctx context.Context, logger *slog.Logger, binPath string, ar
}, nil
}
// SetEnv replaces the environment variables passed to the underlying
// process. When SetEnv is not called, the process inherits the parent's
// environment.
func (cmd *Cmd) SetEnv(env []string) {
cmd.process.Env = env
}
// Start starts the command but does not wait for its completion.
func (cmd *Cmd) Start() error {
err := cmd.pipeOutput()