Handle explicit `:0` when checking referrer validity.
URLs like `https://whatever.com:0/` have an opaque origin, as they're rejected in the SchemeHostPort constructor (see [1] and [2]). This means that they fail the `IsOriginSecure()` check, and crash the renderer, which is a bit unfortunate, as they're going to fail to load regardless. This patch excludes URLs with opaque origins from the referrer check in order to avoid that crash. [1]: https://cs.chromium.org/chromium/src/url/scheme_host_port.h?rcl=90e84c7240870d52c224cb8c07b52545a2ef7cef&l=83 [2]: https://cs.chromium.org/chromium/src/url/scheme_host_port.cc?rcl=90e84c7240870d52c224cb8c07b52545a2ef7cef&l=85 Bug: 960312 Change-Id: I39a41e3148554fda36e52d1f0c9934f52a2b8dff Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1771906 Commit-Queue: Mike West <mkwst@chromium.org> Reviewed-by:Yutaka Hirano <yhirano@chromium.org> Cr-Commit-Position: refs/heads/master@{#691093}
Showing
Please register or sign in to comment