-
Notifications
You must be signed in to change notification settings - Fork 18.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validate hostname starting from 1.24 API. #23740
Validate hostname starting from 1.24 API. #23740
Conversation
4e441e4
to
1e23537
Compare
❤️ thank you! /cc @ibuildthecloud |
Cc @alena1108: works for you? |
@icecrime yup, thank you! |
LGTM |
I'm not fond of passing version around in the API :S not sure what the alternative is... |
can't we have a bool argument instead?
and then pass around |
@runcom That's a good idea 😉 |
1e23537
to
46dd0ea
Compare
Rebased and update 👼 |
👍 LGTM |
@vdemeester TestParseWords is failing |
@tiborvass hum… I'll look into it 👼 |
46dd0ea
to
795ed7d
Compare
@tiborvass rebase because I don't reproduce the failure of this test 😓 (which is worrying me a bit 😭 ). |
795ed7d
to
17fc51c
Compare
Much better! LGTM |
@vdemeester can you add a mention of this change to https://github.com/docker/docker/blob/master/docs/reference/api/docker_remote_api.md#v124-api-changes ? |
Perhaps we should mention it in the "HostName" JSON option in https://github.com/docker/docker/blob/master/docs/reference/api/docker_remote_api_v1.24.md#create-a-container as well (that it must be a valid RFC 1123 hostname, per #20566) |
In order to keep a little bit of "sanity" on the API side, validate hostname only starting from v1.24 API version. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
17fc51c
to
6daf3d2
Compare
@thaJeztah updated 👼 |
@@ -133,9 +133,10 @@ This section lists each version from latest to oldest. Each listing includes a | |||
* `POST /containers/{name:.*}/copy` is now removed and errors out starting from this API version. | |||
* API errors are now returned as JSON instead of plain text. | |||
* `POST /containers/create` and `POST /containers/(id)/start` allow you to configure kernel parameters (sysctls) for use in the container. | |||
* `POST /v1.23/containers/<container ID>/exec` and `POST /v1.23/exec/<exec ID>/start` | |||
* `POST /containers/<container ID>/exec` and `POST /exec/<exec ID>/start` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx 😊
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😝
LGTM, thanks! |
In order to keep a little bit of "sanity" on the API side, validate hostname only starting from v1.24 API version 🐯.
Fixes #23729.
/cc @thaJeztah @tiborvass @icecrime
🐸
Signed-off-by: Vincent Demeester vincent@sbr.pm