Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Do not allow redirecting to data: or about: URLs
https://bugs.webkit.org/show_bug.cgi?id=230158 <rdar://83244357> Reviewed by Brent Fulgham. Do not allow redirecting to data: or about: URLs, as per: - whatwg/html#7042 This aligns our behavior with Blink and gets us closer to Gecko. * LayoutTests/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/redirect-to-about.window-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/redirect-to-data-expected.txt: * Source/WebCore/loader/DocumentLoader.cpp: (WebCore::DocumentLoader::willSendRequest): Canonical link: https://commits.webkit.org/254619@main
- Loading branch information
Showing
8 changed files
with
25 additions
and
107 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
CONSOLE MESSAGE: Not allowed to redirect to about:blank due to its scheme | ||
CONSOLE MESSAGE: Not allowed to redirect to about:blank due to its scheme | ||
CONSOLE MESSAGE: Not allowed to redirect to about:srcdoc due to its scheme | ||
CONSOLE MESSAGE: Not allowed to redirect to about:srcdoc due to its scheme | ||
CONSOLE MESSAGE: Not allowed to redirect to about:nonstandard due to its scheme | ||
CONSOLE MESSAGE: Not allowed to redirect to about:nonstandard due to its scheme | ||
|
||
FAIL An iframe with src set to a redirect to about:blank assert_throws_dom: function "() => { | ||
iframe.contentWindow.document; | ||
}" did not throw | ||
FAIL An iframe that is navigated to a redirect to about:blank assert_throws_dom: function "() => { | ||
iframe.contentWindow.document; | ||
}" did not throw | ||
FAIL An iframe with src set to a redirect to about:srcdoc assert_throws_dom: function "() => { | ||
iframe.contentWindow.document; | ||
}" did not throw | ||
FAIL An iframe that is navigated to a redirect to about:srcdoc assert_throws_dom: function "() => { | ||
iframe.contentWindow.document; | ||
}" did not throw | ||
PASS An iframe with src set to a redirect to about:blank | ||
PASS An iframe that is navigated to a redirect to about:blank | ||
PASS An iframe with src set to a redirect to about:srcdoc | ||
PASS An iframe that is navigated to a redirect to about:srcdoc | ||
PASS An iframe with src set to a redirect to about:nonstandard | ||
PASS An iframe that is navigated to a redirect to about:nonstandard | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
|
||
|
||
FAIL Loading an iframe with src=redirecting URL assert_unreached: must not be messaged Reached unreachable code | ||
FAIL Navigating an iframe to a redirecting URL assert_unreached: must not be messaged Reached unreachable code | ||
PASS Loading an iframe with src=redirecting URL | ||
PASS Navigating an iframe to a redirecting URL | ||
PASS Loading a popup directly to the redirecting URL | ||
PASS Loading a popup that eventually goes to the redirecting URL | ||
|
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