Merge pull request #10128 from vieux/filters_image
Server-side restriction of allowed image filters Upstream-commit: cb9db04fd72cf31b3df802fe19a0cff4cf682438 Component: engine
This commit is contained in:
@ -50,10 +50,6 @@ const (
|
||||
tarHeaderSize = 512
|
||||
)
|
||||
|
||||
var (
|
||||
acceptedImageFilterTags = map[string]struct{}{"dangling": {}}
|
||||
)
|
||||
|
||||
func (cli *DockerCli) CmdHelp(args ...string) error {
|
||||
if len(args) > 1 {
|
||||
method, exists := cli.getMethod(args[:2]...)
|
||||
@ -1352,12 +1348,6 @@ func (cli *DockerCli) CmdImages(args ...string) error {
|
||||
}
|
||||
}
|
||||
|
||||
for name := range imageFilterArgs {
|
||||
if _, ok := acceptedImageFilterTags[name]; !ok {
|
||||
return fmt.Errorf("Invalid filter '%s'", name)
|
||||
}
|
||||
}
|
||||
|
||||
matchName := cmd.Arg(0)
|
||||
// FIXME: --viz and --tree are deprecated. Remove them in a future version.
|
||||
if *flViz || *flTree {
|
||||
|
||||
Reference in New Issue
Block a user