mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-20 15:09:42 +00:00
LibWeb: Update Fetch's compute the redirect-taint concept
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
This commit is contained in:
parent
e9246c15d9
commit
0dc2fb3781
Notes:
github-actions[bot]
2025-08-12 11:09:46 +00:00
Author: https://github.com/kennethmyhra
Commit: 0dc2fb3781
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5826
Reviewed-by: https://github.com/trflynn89 ✅
5 changed files with 60 additions and 31 deletions
|
@ -545,9 +545,8 @@ WebIDL::ExceptionOr<GC::Ptr<PendingResponse>> main_fetch(JS::Realm& realm, Infra
|
|||
if (internal_response->url_list().is_empty())
|
||||
internal_response->set_url_list(request->url_list());
|
||||
|
||||
// 17. If request has a redirect-tainted origin, then set internalResponse’s has-cross-origin-redirects to true.
|
||||
if (request->has_redirect_tainted_origin())
|
||||
internal_response->set_has_cross_origin_redirects(true);
|
||||
// 17. Set internalResponse’s redirect taint to request’s redirect-taint.
|
||||
internal_response->set_redirect_taint(request->redirect_taint());
|
||||
|
||||
// 18. If request’s timing allow failed flag is unset, then set internalResponse’s timing allow passed flag.
|
||||
if (!request->timing_allow_failed())
|
||||
|
@ -706,8 +705,8 @@ void fetch_response_handover(JS::Realm& realm, Infrastructure::FetchParams const
|
|||
// 6. Let responseStatus be 0.
|
||||
auto response_status = 0;
|
||||
|
||||
// 7. If fetchParams’s request’s mode is not "navigate" or response’s has-cross-origin-redirects is false:
|
||||
if (fetch_params.request()->mode() != Infrastructure::Request::Mode::Navigate || !response.has_cross_origin_redirects()) {
|
||||
// 7. If fetchParams’s request’s mode is not "navigate" or response’s redirect taint is "same-origin":
|
||||
if (fetch_params.request()->mode() != Infrastructure::Request::Mode::Navigate || response.redirect_taint() == Infrastructure::RedirectTaint::SameOrigin) {
|
||||
// 1. Set responseStatus to response’s status.
|
||||
response_status = response.status();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue