jingxiaolu
e5ee0a0ce1
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>
(cherry picked from commit eedae47681500c0f38752cd3c0bf3d08d7b3c7fc)
2023-08-03 16:16:02 +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 14:31:55 +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
2020-11-28 11:20:04 +08:00
2020-11-28 11:20:04 +08:00
2020-11-28 11:20:04 +08:00
2020-11-28 11:20:04 +08:00
2020-11-28 11:20:04 +08:00
2020-11-28 11:20:04 +08:00
2021-01-18 21:44:33 +08:00
2020-11-28 11:20:04 +08:00
2020-11-28 11:20:04 +08:00
2020-11-28 11:20:04 +08:00
2020-11-28 11:20:04 +08:00
2020-11-28 11:20:04 +08:00
2020-11-28 11:20:04 +08:00
2021-01-18 21:44:33 +08:00
2020-11-28 11:20:04 +08:00
2021-01-18 21:44:33 +08:00
2022-06-28 15:54:39 +08:00
2021-01-18 21:44:33 +08:00
2021-01-18 21:44:33 +08:00
2021-01-18 21:44:33 +08:00
2021-01-18 21:44:33 +08:00
2021-01-18 21:44:33 +08:00
2021-01-18 21:44:33 +08:00
2021-01-18 21:44:33 +08:00
2021-03-05 11:24:18 +08:00
2021-03-05 11:24:18 +08:00
2021-03-05 11:24:44 +08:00
2021-03-18 15:12:04 +08:00
2021-10-12 14:49:09 +08:00
2021-10-12 14:49:09 +08:00
2022-06-28 15:54:39 +08:00
2022-06-28 15:54:39 +08:00
2022-06-28 15:54:39 +08:00
2022-06-28 15:54:39 +08:00
2022-06-28 15:54:39 +08:00
2022-06-28 15:54:39 +08:00
2022-06-28 15:54:39 +08:00
2022-06-28 15:54:39 +08:00
2022-06-28 15:54:39 +08:00
2022-06-28 15:54:39 +08:00
2022-06-28 15:54:39 +08:00
2022-06-28 15:54:39 +08:00
2022-06-28 15:54:39 +08:00
2022-06-28 15:54:39 +08:00
2022-06-28 15:54:39 +08:00
2022-06-28 15:54:39 +08:00
2022-06-28 15:54:39 +08:00
2022-06-28 15:54:39 +08:00
2022-06-28 15:54:39 +08:00
2022-06-28 15:54:39 +08:00
2022-06-28 15:54:39 +08:00
2022-06-28 15:54:39 +08:00
2022-06-28 15:54:39 +08:00
2022-06-28 15:54:39 +08:00
2022-06-28 15:54:39 +08:00
2022-06-28 15:54:39 +08:00
2022-06-28 15:54:39 +08:00
2022-06-28 19:30:18 +08:00
2022-06-28 15:54:39 +08:00
2022-06-28 15:54:39 +08:00
2022-06-28 19:30:18 +08:00
2022-06-28 19:30:18 +08:00
2022-06-28 19:30:18 +08:00
2022-06-28 19:30:18 +08:00
2022-06-28 19:30:18 +08:00
2022-09-15 14:16:29 +08:00
2022-09-15 15:05:15 +08:00
2022-09-15 16:28:51 +08:00
2022-09-16 09:23:38 +08:00
2022-11-22 16:37:24 +08:00
2022-11-22 20:41:35 +08:00
2022-12-01 16:28:40 +08:00
2023-02-17 16:52:28 +08:00
2023-03-15 10:04:07 +08:00
2023-03-16 14:36:24 +08:00
2023-03-30 10:02:39 +08:00
2023-03-30 10:02:39 +08:00
2023-03-30 10:02:39 +08:00
2023-03-30 10:02:39 +08:00
2023-03-30 10:02:39 +08:00
2023-03-30 10:02:39 +08:00
2023-03-30 10:02:39 +08:00
2023-03-30 10:02:39 +08:00
2023-03-30 10:02:39 +08:00
2023-03-30 10:02:39 +08:00
2023-03-30 10:02:39 +08:00
2023-03-30 10:02:39 +08:00
2023-04-06 20:00:12 +08:00
2023-04-06 20:00:12 +08:00
2023-04-06 20:00:12 +08:00
2023-06-09 10:58:35 +08:00
2023-06-29 15:29:20 +08:00
2023-08-02 16:02:13 +08:00
2023-08-03 16:16:02 +08:00