moby / moby/moby

Removing volumes

Open
#46,800 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/api area/volumes kind/bug status/0-triage
Dominant language
Go
Stars
72.1k
Forks
19.2k
Avg merge
1d 17h
Merged PRs (30d)
164

Description

Description

I'm not sure if this is a bug.

https://github.com/moby/moby/blob/7c8d02d1bc8511fb05eb5074ec9b5bae54d2c5e2/client/volume_remove.go#L24

Shouldn't volumeID be escaped as it is used directly in URL?
I mean something like this:

resp, err := cli.delete(ctx, "/volumes/"+url.QueryEscape(volumeID), query, nil)
Reproduce

does not apply

Expected behavior

does not apply

docker version
does not apply
docker info
does not apply
Additional Info

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at client/volume_remove.go line 24 and inspect how volumeID is passed into the delete URL. Determine whether volume names containing URL-sensitive characters are handled correctly, then verify the behavior with the relevant volume-removal client tests. Done means the URL construction is correct and the behavior is covered by a test.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.