inspect: Support IPv6 addresses in remote address validation The validateLocation() function in chrome://inspect only accepted hostnames matching [a-zA-Z0-9\.\-_]+ in the host:port pair, silently rejecting IPv6 addresses in bracket notation (e.g. [2001:db8::1]:9222) without any error message. The C++ backend (HostPortPair::FromString() and the host resolver) already handles IPv6 literals correctly -- the issue was purely in the JS UI validation. Update the regex to also accept bracket-enclosed IPv6 addresses per RFC 3986, using non-capturing groups for the host part since only the port (match[1]) is needed. Bug: 502249088 Change-Id: I38dd90d6220917e4abb9e514e405a5a7963347dc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7789272 Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Finnur Thorarinsson <finnur@chromium.org> Commit-Queue: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/main@{#1629226}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.