Skip to content

fix: percent-encode git context query values - #1400

Open
locker95 wants to merge 1 commit into
docker:mainfrom
locker95:fix-git-query-plus
Open

locker95 wants to merge 1 commit into
docker:mainfrom
locker95:fix-git-query-plus

Conversation

@locker95

Copy link
Copy Markdown

+ in a git tag is a normal semver build suffix, but the query context was just concatenated. BuildKit parses that with url.ParseQuery, which treats + as a space, so refs/tags/v1.2.3+build.4 is looked up as refs/tags/v1.2.3 build.4.

Percent-encode the query values and leave / alone, so the refs we already emit stay the same.

Hit this from docker/github-builder#330.

A '+' in a tag ref was decoded as a space. Encode query values
without rewriting slashes in refs.

Signed-off-by: Dean Chen <862469039@qq.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant