fix(F1085): scope rm to /configs/<path> not /configs + <path>
rm received /configs and filePath as two separate arguments, deleting the entire /configs dir on every call. Concatenate to target only the intended file. validateRelPath already prevents traversal, so this is a logic bug not a security vulnerability. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
557394f853
commit
f4207cd1dc
@ -171,7 +171,7 @@ func (h *TemplatesHandler) deleteViaEphemeral(ctx context.Context, volumeName, f
|
||||
|
||||
resp, err := h.docker.ContainerCreate(ctx, &container.Config{
|
||||
Image: "alpine:latest",
|
||||
Cmd: []string{"rm", "-rf", "/configs", filePath},
|
||||
Cmd: []string{"rm", "-rf", "/configs/" + filePath},
|
||||
}, &container.HostConfig{
|
||||
Binds: []string{volumeName + ":/configs"},
|
||||
}, nil, nil, "")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user