Repository navigation
Commit 3192ee8
committed
fix(sandbox): parse bracketed IPv6 authorities in client CONNECT targets
parse_target split the CONNECT authority at the first colon, so an
IPv6-literal target like [2001:db8::1]:443 always failed port parsing and
IPv6-literal clients could never reach policy evaluation; a regression
test even locked in that failure. Parse the RFC 3986 bracketed form and
return the host bracket-free, matching what DNS resolution, SSRF
validation, NO_PROXY matching, and the upstream CONNECT builder expect.
Unclosed brackets, a missing or empty port after the bracket, and
non-numeric ports are rejected; unbracketed behavior is unchanged.
Replaces the failure-locking test with success coverage for bracketed
targets and adds malformed-bracket rejection cases.
Signed-off-by: Philippe Martin <[email protected]>1 parent 5be9905 commit 3192ee8
1 file changed
Lines changed: 43 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4948 | 4948 | | |
4949 | 4949 | | |
4950 | 4950 | | |
| 4951 | + | |
| 4952 | + | |
| 4953 | + | |
| 4954 | + | |
| 4955 | + | |
| 4956 | + | |
4951 | 4957 | | |
4952 | | - | |
4953 | | - | |
4954 | | - | |
| 4958 | + | |
| 4959 | + | |
| 4960 | + | |
| 4961 | + | |
| 4962 | + | |
| 4963 | + | |
| 4964 | + | |
| 4965 | + | |
| 4966 | + | |
| 4967 | + | |
| 4968 | + | |
| 4969 | + | |
| 4970 | + | |
4955 | 4971 | | |
4956 | 4972 | | |
4957 | 4973 | | |
| |||
8337 | 8353 | | |
8338 | 8354 | | |
8339 | 8355 | | |
8340 | | - | |
8341 | | - | |
8342 | | - | |
8343 | | - | |
8344 | | - | |
| 8356 | + | |
| 8357 | + | |
| 8358 | + | |
| 8359 | + | |
| 8360 | + | |
| 8361 | + | |
| 8362 | + | |
| 8363 | + | |
| 8364 | + | |
| 8365 | + | |
| 8366 | + | |
| 8367 | + | |
| 8368 | + | |
| 8369 | + | |
| 8370 | + | |
| 8371 | + | |
| 8372 | + | |
| 8373 | + | |
| 8374 | + | |
| 8375 | + | |
| 8376 | + | |
| 8377 | + | |
| 8378 | + | |
| 8379 | + | |
8345 | 8380 | | |
8346 | 8381 | | |
8347 | 8382 | | |
| |||
0 commit comments