Skip to content

fix: preserve equals signs in image label filter values - #5163

Merged
AkihiroSuda merged 1 commit into
containerd:mainfrom
immanuwell:fix-image-label-filter-equals
Sep 8, 2026
Merged

fix: preserve equals signs in image label filter values#5163
AkihiroSuda merged 1 commit into
containerd:mainfrom
immanuwell:fix-image-label-filter-equals

Conversation

@immanuwell

@immanuwell immanuwell commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

nerdctl images --filter label=example.payload=a=b fails with invalid filter, while Docker accepts the same filter.
Label values are plain strings, so = is legit here

The parser now splits into at most three parts and keeps the rest in the label value.
Non-label filters keep their old validation

Repro before this change:

nerdctl images --filter label=example.payload=a=b

FATA[0000] invalid filter "label=example.payload=a=b"

Tested with go test ./pkg/imgutil ./pkg/cmd/image

Signed-off-by: Immanuel Tikhonov <pchpr.00@list.ru>

@AkihiroSuda AkihiroSuda left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@AkihiroSuda
AkihiroSuda merged commit d783014 into containerd:main Sep 8, 2026
47 of 50 checks passed
@AkihiroSuda AkihiroSuda added this to the v2.4.0 milestone Sep 8, 2026
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.

2 participants