jingxiaolu
f5527c508a
docker: define a dummy hostname to use for local connections
...
For local communications (npipe://, unix://), the hostname is not used,
but we need valid and meaningful hostname.
The current code used the client's `addr` as hostname in some cases, which
could contain the path for the unix-socket (`/var/run/docker.sock`), which
gets rejected by go1.20.6 and go1.19.11 because of a security fix for
[CVE-2023-29406 ][1], which was implemented in https://go.dev/issue/60374 .
Prior versions go Go would clean the host header, and strip slashes in the
process, but go1.20.6 and go1.19.11 no longer do, and reject the host
header.
This patch introduces a `DummyHost` const, and uses this dummy host for
cases where we don't need an actual hostname.
Signed-off-by: jingxiaolu <lujingxiao@huawei.com>
2023-07-28 17:47:05 +08:00
..
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2020-03-05 15:13:09 +08:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2020-03-05 15:13:09 +08:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-12-25 19:10:46 +08:00
2019-12-25 19:10:46 +08:00
2019-09-30 10:37:25 -04:00
2019-12-25 19:10:46 +08:00
2019-09-30 10:37:25 -04:00
2019-12-25 19:10:46 +08:00
2019-12-25 19:10:46 +08:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-09-30 10:37:25 -04:00
2019-12-25 19:10:46 +08:00
2022-11-24 11:46:52 +08:00
2019-09-30 10:37:25 -04:00
2019-12-25 19:10:46 +08:00
2019-12-25 19:10:46 +08:00
2019-09-30 10:37:25 -04:00
2019-12-25 19:10:46 +08:00
2019-09-30 10:37:25 -04:00
2019-12-25 19:10:46 +08:00
2019-12-25 19:10:46 +08:00
2019-12-25 19:10:46 +08:00
2019-12-25 19:10:46 +08:00
2019-12-25 19:10:46 +08:00
2019-12-25 19:10:46 +08:00
2019-12-25 19:10:46 +08:00
2019-12-25 19:10:46 +08:00
2020-03-05 15:13:09 +08:00
2020-03-05 15:13:09 +08:00
2020-03-05 15:13:09 +08:00
2020-03-05 15:13:09 +08:00
2020-03-05 15:13:09 +08:00
2020-03-05 15:13:09 +08:00
2020-03-05 15:13:09 +08:00
2020-03-05 15:13:09 +08:00
2021-01-19 14:03:29 +08:00
2021-01-19 14:03:29 +08:00
2021-01-19 14:03:29 +08:00
2021-01-19 14:03:29 +08:00
2022-11-24 11:46:52 +08:00
2020-07-06 18:56:50 +08:00
2021-01-19 14:03:29 +08:00
2021-01-19 14:03:29 +08:00
2020-11-28 09:37:25 +08:00
2020-11-28 09:37:25 +08:00
2020-11-28 09:37:25 +08:00
2020-11-28 09:37:25 +08:00
2020-11-28 09:37:25 +08:00
2021-01-19 14:03:29 +08:00
2021-01-19 14:03:29 +08:00
2021-01-04 10:45:04 +08:00
2021-01-19 14:03:29 +08:00
2021-01-04 10:45:04 +08:00
2021-01-19 14:03:29 +08:00
2021-01-04 10:45:04 +08:00
2021-01-19 14:03:29 +08:00
2021-01-19 14:03:29 +08:00
2021-01-19 14:03:29 +08:00
2021-01-19 14:03:29 +08:00
2021-01-19 14:03:29 +08:00
2021-01-19 14:03:29 +08:00
2021-01-19 14:03:29 +08:00
2021-01-19 14:03:29 +08:00
2021-03-18 15:40:53 +08:00
2021-03-18 15:40:53 +08:00
2021-03-18 15:40:53 +08:00
2021-03-18 15:40:53 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-29 09:45:41 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-28 16:29:12 +08:00
2022-06-29 09:45:41 +08:00
2022-06-29 09:50:20 +08:00
2022-06-29 09:54:58 +08:00
2022-06-29 09:57:50 +08:00
2022-06-29 14:52:33 +08:00
2022-09-13 19:58:50 +08:00
2022-09-13 20:38:42 +08:00
2022-09-15 11:24:04 +08:00
2022-09-15 17:31:01 +08:00
2022-11-22 14:50:42 +08:00
2022-11-22 20:49:27 +08:00
2022-12-01 15:19:28 +08:00
2023-02-17 16:39:45 +08:00
2023-03-10 15:42:11 +08:00
2023-03-14 19:27:35 +08:00
2023-03-15 17:24:08 +08:00
2023-03-16 20:03:19 +08:00
2023-03-16 20:03:19 +08:00
2023-03-16 20:03:19 +08:00
2023-03-29 15:16:12 +08:00
2023-03-29 15:16:12 +08:00
2023-03-29 15:16:12 +08:00
2023-03-29 15:16:12 +08:00
2023-03-29 15:16:12 +08:00
2023-03-29 15:16:12 +08:00
2023-03-29 15:16:12 +08:00
2023-03-29 15:16:12 +08:00
2023-03-29 15:16:12 +08:00
2023-03-29 15:16:12 +08:00
2023-03-29 15:16:12 +08:00
2023-03-29 15:16:12 +08:00
2023-04-06 16:19:21 +08:00
2023-04-06 16:19:21 +08:00
2023-04-06 16:19:21 +08:00
2023-06-08 16:32:46 +08:00
2023-06-27 16:59:43 +08:00
2023-06-29 16:16:05 +08:00
2023-07-28 17:47:05 +08:00