SABITHSAHEB opened a new pull request, #14133: URL: https://github.com/apache/trafficserver/pull/14133
1. `IncludeUrlValidator::splitUrl` took the host of an unbracketed authority as everything before the first `:`. `url_parse_internet` treats an authority with more than one `:` as a bare IPv6 host (host plus port at eight colons), and `HttpTransact` loads that host as an IP literal and connects to it without DNS. 2. As a result `http://fd00:ec2::254/latest/meta-data/` (IMDS over IPv6), `http://fe80::1/` and `http://fc00:0:0:0:0:0:0:1:8080/x` were checked as the hostnames `fd00`, `fe80` and `fc00` and returned `ok`, while the bracketed forms are rejected as `private-host`. Validation runs after variable expansion, so a template like `src="http://$(HTTP_COOKIE{h})/x"` lets the client pick that host. The fetch still has to match a remap rule, so real exposure depends on remap.config, but the private-host denylist did not hold for these literals. 3. An unbracketed authority with more than one `:` is now rejected as `malformed-url`, in line with RFC 3986 requiring brackets around IPv6 literals. Added `splitUrl` and `validate` cases to `include_url_validator_test.cc`; run standalone, they fail against master (2 assertions) and the whole file passes with this change. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
