moby/api/server/router
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
..
build api/server: build: refactor for better readability 2019-12-04 16:19:01 +01:00
checkpoint Switch from x/net/context -> context 2018-04-23 13:52:44 -07:00
container api: POST /containers/{id}/wait: validate "condition" parameter 2022-02-14 21:47:55 +01:00
debug Switch from x/net/context -> context 2018-04-23 13:52:44 -07:00
distribution Remove more of registry v1 code. 2021-02-23 09:49:46 +01:00
grpc grpc: make sure typed errors handler is installed 2021-04-26 22:38:59 -07:00
image Add support for platform (os and architecture) on image import 2022-01-24 18:24:51 +01:00
network Fix libnetwork imports 2021-06-01 21:51:23 +00:00
plugin api: normalize comment formatting 2019-11-27 15:37:30 +01:00
session move /session api endpoint out of experimental 2018-08-21 22:43:34 +00:00
swarm Add ulimits support to services 2020-07-29 02:09:06 +02:00
system API: discard /system/df type parameter pre-1.42 2021-08-06 19:33:16 +02:00
volume Rely on request.Context() cancellation 2018-11-27 17:06:31 -08:00
experimental.go fix typos 2018-09-01 21:26:38 +08:00
local.go api/server/router: use consts for HTTP methods 2019-11-26 21:55:29 +01:00
router.go Add canonical import comment 2018-02-05 16:51:57 -05:00