forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reconcile treating port=0 as valid across GURL and url::SchemeHostPort.
Before this CL: *) GURL port_zero("http://example.com:0") would be considered a valid URL (in conformance with https://url.spec.whatwg.org/#port-state which allows port 0). *) SchemeHostPort constructed out of such GURL would be considered invalid. *) The inconsistency between GURL and SchemeHostPort would lead to bizarre results such as url::Origin::Resolve(url=http://foo.com:0, base_origin=http://bar.com) returning an opaque origin with a precursor origin set to http://bar.com. This in turn would lead to browser process crashes via CHECK(...CanAccessDataForOrigin...). After this CL: *) SchemeHostPort allows port=0 *) url::Origin::Resolve works as expected (verified by a new unit test) *) No browser-process crashes (verified by a new browser test) Also after this CL: *) Navigating to port=0 still doesn't quite work, because Blink treats this as an invalid port (in KURL and SecurityOrigin) which results in the port round-tripping to the browser in DidCommitProvisionalLoad IPC as port=80 (and the mismatch leads to a renderer kill). Bug: 1065532 Change-Id: I719fcfb0a027187805c3766d5e4b0365553067f0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2128829 Reviewed-by: Nasko Oskov <nasko@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Peter Kasting <pkasting@chromium.org> Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org> Cr-Commit-Position: refs/heads/master@{#758574}
- Loading branch information
1 parent
95fb308
commit c664e8b
Showing
7 changed files
with
166 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters