moby--moby/api/server
Sebastiaan van Stijn 737e8c6ab8
api: POST /containers/{id}/wait: validate "condition" parameter
The endpoint was silently ignoring invalid values for the "condition" parameter.
This patch now returns a 400 status if an unknown, non-empty "condition" is passed.

With this patch:

    curl --unix-socket /var/run/docker.sock -XPOST 'http://localhost/v1.41/containers/foo/wait?condition=foobar'
    {"message":"invalid condition: \"foobar\""}

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-14 21:47:55 +01:00
..
backend/build API: add "prune" events 2020-07-28 12:41:14 +02:00
httputils api/server: use constants for http methods 2019-10-13 17:30:19 +02:00
middleware bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
router api: POST /containers/{id}/wait: validate "condition" parameter 2022-02-14 21:47:55 +01:00
middleware.go Add canonical import comment 2018-02-05 16:51:57 -05:00
server.go Remove unused router swapper 2019-09-04 13:50:03 -07:00
server_test.go api/server: use constants for http methods 2019-10-13 17:30:19 +02:00