Repository navigation
Commit 5082c7e
kernel: drop bare IPv6 support on the host:port path
Remove _is_bare_ipv6 and the ipaddress import. Bare IPv6 hosts such as ::1 never worked on the kernel path: the kernel prepends https:// and its URL parser rejects an unbracketed IPv6 literal. IPv6 literals must be bracketed ([::1]).
With _port set, urlsplit reads everything after the first colon of a bare IPv6 literal as the port. That text always contains another colon, so the integer parse fails and the existing "malformed IPv6 literal or port" ValueError is raised before any request. This includes _port=443. Without _port the host still passes through unchanged, as on main.
Tests: the ("::1", 8443) -> "[::1]:8443" row is removed. ::1 with _port 8443 or 443, and 2001:db8::1 with _port 8443, are now in the reject table.
Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>1 parent f242c0f commit 5082c7e
2 files changed
Lines changed: 9 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
94 | 93 | | |
95 | 94 | | |
96 | 95 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | 96 | | |
110 | 97 | | |
111 | | - | |
| 98 | + | |
| 99 | + | |
112 | 100 | | |
113 | 101 | | |
114 | 102 | | |
115 | | - | |
116 | | - | |
117 | 103 | | |
118 | 104 | | |
119 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1202 | 1202 | | |
1203 | 1203 | | |
1204 | 1204 | | |
1205 | | - | |
| 1205 | + | |
1206 | 1206 | | |
1207 | 1207 | | |
1208 | 1208 | | |
| |||
1224 | 1224 | | |
1225 | 1225 | | |
1226 | 1226 | | |
| 1227 | + | |
| 1228 | + | |
1227 | 1229 | | |
1228 | | - | |
1229 | 1230 | | |
1230 | 1231 | | |
1231 | 1232 | | |
| |||
1358 | 1359 | | |
1359 | 1360 | | |
1360 | 1361 | | |
1361 | | - | |
1362 | 1362 | | |
1363 | 1363 | | |
1364 | 1364 | | |
| |||
1376 | 1376 | | |
1377 | 1377 | | |
1378 | 1378 | | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
1379 | 1383 | | |
1380 | 1384 | | |
1381 | 1385 | | |
| |||
0 commit comments