[net] Allow redirects to data: URLs in manual redirect mode [chromium/src : main]

0 views
Skip to first unread message

Helmut Januschka (Gerrit)

unread,
Jan 5, 2026, 6:33:02 PMJan 5
to Helmut Januschka, Adam Rice, Yoav Weiss (@Shopify), Nate Chapin, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, kinuko...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, loading-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org
Attention needed from Adam Rice and mmenke

Helmut Januschka added 2 comments

Commit Message
Line 6, Patchset 7:
[net] Allow data: URL redirects in manual redirect mode
mmenke . resolved

Let's make clear these are redirects to data URLs, not redirects from them.

Helmut Januschka

Done

File services/network/cors/cors_url_loader.cc
Line 689, Patchset 7: deferred_redirect_url_ = std::make_unique<GURL>(redirect_info.new_url);
response_head->response_type = mojom::FetchResponseType::kOpaqueRedirect;
response_head->timing_allow_passed = !timing_allow_failed_flag_;
mmenke . unresolved

I'm a bit concerned that we don't seem to have any protection against following these redirects. It looks like we'd just return ERR_UNKNOWN_URL_SCHEME (See https://source.chromium.org/chromium/chromium/src/+/main:net/url_request/url_request_job_factory.cc;l=112), but I really don't understand the implications of letting callers do that, or the lack of protections against it).

It seems to me like we really should be closing the pipe to prevent following the redirects, if manual mode means the consumer is expected to manually make a new request to follow the redirect (It's not clear if it means that, from glancing at the spec, unfortunately - that's the problem with purely prescriptive specs. They're basically code without comments).

I'm going to defer to Adam here, as CORS isn't really my area.

Helmut Januschka

tried adding protection to close the pipe after sending the opaque-response:

```cpp
if (request_.redirect_mode == mojom::RedirectMode::kManual) {
HandleComplete(URLLoaderCompletionStatus(net::ERR_FAILED));
return;
}
```

This broke a large number of tests. The issue is that OnReceiveRedirect is the mechanism to deliver the opaque-redirect response to the client.
its not actually following the redirect. The client receives the redirect info wrapped in an opaque response, and the flow completes normally.

the redirect is never followed

Open in Gerrit

Related details

Attention is currently required from:
  • Adam Rice
  • mmenke
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: If678bf4190e0c0630fe7036f514dab7ce8fa134e
Gerrit-Change-Number: 7131545
Gerrit-PatchSet: 9
Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
Gerrit-CC: Nate Chapin <jap...@chromium.org>
Gerrit-CC: Yoav Weiss (@Shopify) <yoav...@chromium.org>
Gerrit-CC: mmenke <mme...@chromium.org>
Gerrit-Attention: mmenke <mme...@chromium.org>
Gerrit-Attention: Adam Rice <ri...@chromium.org>
Gerrit-Comment-Date: Mon, 05 Jan 2026 23:32:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: mmenke <mme...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

mmenke (Gerrit)

unread,
Jan 6, 2026, 11:13:47 AMJan 6
to Helmut Januschka, Adam Rice, Yoav Weiss (@Shopify), Nate Chapin, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, kinuko...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, loading-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org
Attention needed from Adam Rice and Helmut Januschka

mmenke added 1 comment

File services/network/cors/cors_url_loader.cc
Line 689, Patchset 7: deferred_redirect_url_ = std::make_unique<GURL>(redirect_info.new_url);
response_head->response_type = mojom::FetchResponseType::kOpaqueRedirect;
response_head->timing_allow_passed = !timing_allow_failed_flag_;
mmenke . unresolved

I'm a bit concerned that we don't seem to have any protection against following these redirects. It looks like we'd just return ERR_UNKNOWN_URL_SCHEME (See https://source.chromium.org/chromium/chromium/src/+/main:net/url_request/url_request_job_factory.cc;l=112), but I really don't understand the implications of letting callers do that, or the lack of protections against it).

It seems to me like we really should be closing the pipe to prevent following the redirects, if manual mode means the consumer is expected to manually make a new request to follow the redirect (It's not clear if it means that, from glancing at the spec, unfortunately - that's the problem with purely prescriptive specs. They're basically code without comments).

I'm going to defer to Adam here, as CORS isn't really my area.

Helmut Januschka

tried adding protection to close the pipe after sending the opaque-response:

```cpp
if (request_.redirect_mode == mojom::RedirectMode::kManual) {
HandleComplete(URLLoaderCompletionStatus(net::ERR_FAILED));
return;
}
```

This broke a large number of tests. The issue is that OnReceiveRedirect is the mechanism to deliver the opaque-redirect response to the client.
its not actually following the redirect. The client receives the redirect info wrapped in an opaque response, and the flow completes normally.

the redirect is never followed

mmenke

I'm happy to help figure out how best to do that, if we decide to go in that direction (again, deferring to Adam on that decision).

We'd probably want to either not treat it as a redirect, but rather as a final response (e.g., instead of a 2xx response with body, we'd return a 3xx response with empty body), or call OnReceiveRedirect, but also have this class destroy itself, so there's no object to actually follow the redirect. First approach would probably break more things, though if not, it would be what I prefer. Second approach likely more practical, and shouldn't break consumers unless they continue to monitor the Mojo pipe even after they've received their last message over it...unless they're using manual mode, but actually using the URLLoader to follow the redirect, anyways.

Anyhow, let's hold off on trying either of those until we hear back from Adam.

Open in Gerrit

Related details

Attention is currently required from:
  • Adam Rice
  • Helmut Januschka
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: If678bf4190e0c0630fe7036f514dab7ce8fa134e
Gerrit-Change-Number: 7131545
Gerrit-PatchSet: 10
Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
Gerrit-CC: Nate Chapin <jap...@chromium.org>
Gerrit-CC: Yoav Weiss (@Shopify) <yoav...@chromium.org>
Gerrit-CC: mmenke <mme...@chromium.org>
Gerrit-Attention: Helmut Januschka <hel...@januschka.com>
Gerrit-Attention: Adam Rice <ri...@chromium.org>
Gerrit-Comment-Date: Tue, 06 Jan 2026 16:13:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Helmut Januschka <hel...@januschka.com>
Comment-In-Reply-To: mmenke <mme...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Adam Rice (Gerrit)

unread,
Jan 8, 2026, 2:08:41 AMJan 8
to Helmut Januschka, Yoav Weiss (@Shopify), Nate Chapin, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, kinuko...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, loading-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org
Attention needed from Helmut Januschka

Adam Rice added 2 comments

File net/url_request/url_request.h
Line 1271, Patchset 10 (Latest): bool is_fetch_redirect_mode_manual_ = false;
Adam Rice . unresolved

This should be called `treat_all_redirects_as_safe` to clearly express what it does at this layer, and to avoid making reference to concepts from a higher layer. Same with the setter and getter..

File services/network/cors/cors_url_loader.cc
Line 689, Patchset 7: deferred_redirect_url_ = std::make_unique<GURL>(redirect_info.new_url);
response_head->response_type = mojom::FetchResponseType::kOpaqueRedirect;
response_head->timing_allow_passed = !timing_allow_failed_flag_;
mmenke . unresolved

I'm a bit concerned that we don't seem to have any protection against following these redirects. It looks like we'd just return ERR_UNKNOWN_URL_SCHEME (See https://source.chromium.org/chromium/chromium/src/+/main:net/url_request/url_request_job_factory.cc;l=112), but I really don't understand the implications of letting callers do that, or the lack of protections against it).

It seems to me like we really should be closing the pipe to prevent following the redirects, if manual mode means the consumer is expected to manually make a new request to follow the redirect (It's not clear if it means that, from glancing at the spec, unfortunately - that's the problem with purely prescriptive specs. They're basically code without comments).

I'm going to defer to Adam here, as CORS isn't really my area.

Helmut Januschka

tried adding protection to close the pipe after sending the opaque-response:

```cpp
if (request_.redirect_mode == mojom::RedirectMode::kManual) {
HandleComplete(URLLoaderCompletionStatus(net::ERR_FAILED));
return;
}
```

This broke a large number of tests. The issue is that OnReceiveRedirect is the mechanism to deliver the opaque-redirect response to the client.
its not actually following the redirect. The client receives the redirect info wrapped in an opaque response, and the flow completes normally.

the redirect is never followed

mmenke

I'm happy to help figure out how best to do that, if we decide to go in that direction (again, deferring to Adam on that decision).

We'd probably want to either not treat it as a redirect, but rather as a final response (e.g., instead of a 2xx response with body, we'd return a 3xx response with empty body), or call OnReceiveRedirect, but also have this class destroy itself, so there's no object to actually follow the redirect. First approach would probably break more things, though if not, it would be what I prefer. Second approach likely more practical, and shouldn't break consumers unless they continue to monitor the Mojo pipe even after they've received their last message over it...unless they're using manual mode, but actually using the URLLoader to follow the redirect, anyways.

Anyhow, let's hold off on trying either of those until we hear back from Adam.

Adam Rice

I've spent some time looking at this today. The key thing is that `RedirectMode::kManual` is not by itself a sufficient indicator that we should avoid the check for HTTP(S). All navigations use `RedirectMode::kManual` so skipping the check could open a security hole.

The difficulty we have comes from layering and historical differences from the Fetch Standard. //net checks whether the redirect is safe to follow before returning the response. The Fetch Standard checks whether the redirect is safe to follow at the time when it follows it.

I think the difference is visible in two places:

1. `await fetch("/redirect-to-data-scheme", { redirect: "manual" })` should return a Response object with a type of `"opaqueredirect"` rather than throwing an exception.
2. It should be possible for a Service Worker to cache an `"opaqueredirect"` Response object and then later return that cached Response for a navigation. In this case, IIUC, the network error should happen when the navigation is performed whereas Chrome wouldn't let the `fetch()` return a Response to begin with.

The status quo in Chrome is that //net is performing that filtering on responses itself, so we cannot assume that clients of the URLLoader interface are doing it correctly. Maybe the right way forward is to have a new flag on `network::ResourceRequest` to indicate that the caller expects unfiltered redirects and will filter them itself.

As far as I can tell, it would be safe to censor all non-HTTP(S) URLs to just `data:`, which should limit the security risk if we forget to filter somewhere.

Open in Gerrit

Related details

Attention is currently required from:
  • Helmut Januschka
Gerrit-Comment-Date: Thu, 08 Jan 2026 07:08:11 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Helmut Januschka (Gerrit)

unread,
Jan 8, 2026, 2:16:43 PMJan 8
to Helmut Januschka, Adam Rice, Yoav Weiss (@Shopify), Nate Chapin, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, kinuko...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, loading-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org
Attention needed from Adam Rice and mmenke

Helmut Januschka voted and added 2 comments

Votes added by Helmut Januschka

Commit-Queue+1

2 comments

File net/url_request/url_request.h
Line 1271, Patchset 10: bool is_fetch_redirect_mode_manual_ = false;
Adam Rice . resolved

This should be called `treat_all_redirects_as_safe` to clearly express what it does at this layer, and to avoid making reference to concepts from a higher layer. Same with the setter and getter..

Helmut Januschka

Done

File services/network/cors/cors_url_loader.cc
Helmut Januschka

awesome! really appreciate adam! could you take a look if the recent PS is how you meant it? (WPT's still passing 🤗)

Open in Gerrit

Related details

Attention is currently required from:
  • Adam Rice
  • mmenke
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: If678bf4190e0c0630fe7036f514dab7ce8fa134e
Gerrit-Change-Number: 7131545
Gerrit-PatchSet: 19
Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
Gerrit-CC: Nate Chapin <jap...@chromium.org>
Gerrit-CC: Yoav Weiss (@Shopify) <yoav...@chromium.org>
Gerrit-CC: mmenke <mme...@chromium.org>
Gerrit-Attention: mmenke <mme...@chromium.org>
Gerrit-Attention: Adam Rice <ri...@chromium.org>
Gerrit-Comment-Date: Thu, 08 Jan 2026 19:16:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Helmut Januschka <hel...@januschka.com>
Comment-In-Reply-To: mmenke <mme...@chromium.org>
Comment-In-Reply-To: Adam Rice <ri...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Adam Rice (Gerrit)

unread,
Jan 15, 2026, 10:02:56 AMJan 15
to Helmut Januschka, Yoav Weiss (@Shopify), Nate Chapin, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, kinuko...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, loading-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org
Attention needed from Helmut Januschka and mmenke

Adam Rice added 3 comments

Patchset-level comments
File-level comment, Patchset 19 (Latest):
Adam Rice . resolved

This seems safe to me. lgtm but get feedback from the other reviewers too.

File services/network/cors/cors_url_loader.cc
Line 702, Patchset 19 (Latest): !redirect_info.new_url.SchemeIs("data")) {
Adam Rice . unresolved

I think we should do the rewrite even if the scheme *is* data, just in case the contents of the data URL is something malicious. If everything works as expected, it shouldn't make any difference to any observable outcome.

File services/network/cors/cors_url_loader_unittest.cc
Line 2415, Patchset 19 (Latest): {
Adam Rice . unresolved
Maybe this would be easier to read as a data driven test? Something like
```
struct TestCase {
std::string_view location_header;
std::string_view expected_new_url;
};
static constexpr TestCase test_cases[] = {
{"https://other.example.com/bar.png", "https://other.example.com/bar.png"},
{"data:text/html,hello", "data:"},
...
};
```
Open in Gerrit

Related details

Attention is currently required from:
  • Helmut Januschka
  • mmenke
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: If678bf4190e0c0630fe7036f514dab7ce8fa134e
Gerrit-Change-Number: 7131545
Gerrit-PatchSet: 19
Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
Gerrit-CC: Nate Chapin <jap...@chromium.org>
Gerrit-CC: Yoav Weiss (@Shopify) <yoav...@chromium.org>
Gerrit-CC: mmenke <mme...@chromium.org>
Gerrit-Attention: Helmut Januschka <hel...@januschka.com>
Gerrit-Attention: mmenke <mme...@chromium.org>
Gerrit-Comment-Date: Thu, 15 Jan 2026 15:02:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

mmenke (Gerrit)

unread,
Jan 15, 2026, 5:24:25 PMJan 15
to Helmut Januschka, Adam Rice, Yoav Weiss (@Shopify), Nate Chapin, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, kinuko...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, loading-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org
Attention needed from Helmut Januschka

mmenke added 1 comment

Patchset-level comments
mmenke . resolved

I'll take another look tomorrow, sorry for not getting to it today. This CL is potentially scary, since it affects security-related protections, so want to be very careful here.

Open in Gerrit

Related details

Attention is currently required from:
  • Helmut Januschka
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: If678bf4190e0c0630fe7036f514dab7ce8fa134e
Gerrit-Change-Number: 7131545
Gerrit-PatchSet: 19
Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
Gerrit-CC: Nate Chapin <jap...@chromium.org>
Gerrit-CC: Yoav Weiss (@Shopify) <yoav...@chromium.org>
Gerrit-CC: mmenke <mme...@chromium.org>
Gerrit-Attention: Helmut Januschka <hel...@januschka.com>
Gerrit-Comment-Date: Thu, 15 Jan 2026 22:24:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

mmenke (Gerrit)

unread,
Jan 21, 2026, 2:27:34 PM (9 days ago) Jan 21
to Helmut Januschka, Adam Rice, Yoav Weiss (@Shopify), Nate Chapin, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, kinuko...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, loading-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org
Attention needed from Helmut Januschka

mmenke added 2 comments

Patchset-level comments
File-level comment, Patchset 20 (Latest):
mmenke . resolved

I'm sorry for disappearing here, Helmut. Had some unplanned personal stuff come up (nothing serious), and there was a holidy, so have been out for most of the last week.

File services/network/cors/cors_url_loader.cc
mmenke

"If we forget to filter them somewhere" - this field is set by the renderer, which may be compromised, so we need to consider that in the security model.

I'm a bit confused by how these concerns tie in to the comment "This seems safe to me."

I really don't understand the security model here well enough to be comfortable signing off on this CL, unfortunately, and I don't see a good path forward to learning enough information to change that.

Open in Gerrit

Related details

Attention is currently required from:
  • Helmut Januschka
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: If678bf4190e0c0630fe7036f514dab7ce8fa134e
Gerrit-Change-Number: 7131545
Gerrit-PatchSet: 20
Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
Gerrit-CC: Nate Chapin <jap...@chromium.org>
Gerrit-CC: Yoav Weiss (@Shopify) <yoav...@chromium.org>
Gerrit-CC: mmenke <mme...@chromium.org>
Gerrit-Attention: Helmut Januschka <hel...@januschka.com>
Gerrit-Comment-Date: Wed, 21 Jan 2026 19:27:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Helmut Januschka (Gerrit)

unread,
Jan 21, 2026, 2:47:59 PM (9 days ago) Jan 21
to Helmut Januschka, Adam Rice, Yoav Weiss (@Shopify), Nate Chapin, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, kinuko...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, loading-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org
Attention needed from Adam Rice and mmenke

Helmut Januschka added 4 comments

Patchset-level comments
Helmut Januschka . resolved

dang, hat replies in draft!

@mmenke - no worries about timing, i am doing this in my spare time and expect everything to be async by default!

File services/network/cors/cors_url_loader.cc
Line 689, Patchset 7: deferred_redirect_url_ = std::make_unique<GURL>(redirect_info.new_url);
response_head->response_type = mojom::FetchResponseType::kOpaqueRedirect;
response_head->timing_allow_passed = !timing_allow_failed_flag_;
mmenke . resolved
Helmut Januschka

Done

Line 702, Patchset 19: !redirect_info.new_url.SchemeIs("data")) {
Adam Rice . resolved

I think we should do the rewrite even if the scheme *is* data, just in case the contents of the data URL is something malicious. If everything works as expected, it shouldn't make any difference to any observable outcome.

Helmut Januschka

Done. Now all non-HTTP(S) URLs are censored to "data:," including data: URLs themselves.

File services/network/cors/cors_url_loader_unittest.cc
Line 2415, Patchset 19: {
Adam Rice . resolved
Maybe this would be easier to read as a data driven test? Something like
```
struct TestCase {
std::string_view location_header;
std::string_view expected_new_url;
};
static constexpr TestCase test_cases[] = {
{"https://other.example.com/bar.png", "https://other.example.com/bar.png"},
{"data:text/html,hello", "data:"},
...
};
```
Helmut Januschka

thankks! - done!

Open in Gerrit

Related details

Attention is currently required from:
  • Adam Rice
  • mmenke
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: If678bf4190e0c0630fe7036f514dab7ce8fa134e
    Gerrit-Change-Number: 7131545
    Gerrit-PatchSet: 20
    Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
    Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
    Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
    Gerrit-CC: Nate Chapin <jap...@chromium.org>
    Gerrit-CC: Yoav Weiss (@Shopify) <yoav...@chromium.org>
    Gerrit-CC: mmenke <mme...@chromium.org>
    Gerrit-Attention: mmenke <mme...@chromium.org>
    Gerrit-Attention: Adam Rice <ri...@chromium.org>
    Gerrit-Comment-Date: Wed, 21 Jan 2026 19:47:41 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Adam Rice (Gerrit)

    unread,
    Jan 22, 2026, 6:41:47 AM (9 days ago) Jan 22
    to Helmut Januschka, Yoav Weiss (@Shopify), Nate Chapin, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, kinuko...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, loading-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org
    Attention needed from Helmut Januschka and mmenke

    Adam Rice added 1 comment

    File services/network/cors/cors_url_loader.cc
    Line 689, Patchset 7: deferred_redirect_url_ = std::make_unique<GURL>(redirect_info.new_url);
    response_head->response_type = mojom::FetchResponseType::kOpaqueRedirect;
    response_head->timing_allow_passed = !timing_allow_failed_flag_;
    mmenke . unresolved
    Adam Rice

    My understanding of the security model here:

    1. //net checks the renderer to protect the caller from itself. By the model of the Fetch Standard, it is doing this too early. The Fetch Standard says it is not an error to *receive* a bad redirect, it is only an error to *follow* it. However, we have an extremely large number of callers who have always had our existing behaviour and would blindly follow a bad redirect if we gave them one.
    2. This CL adds a flag to permit a caller to opt into a new behaviour, where the caller is responsible for deciding whether to follow the redirect or not.
    3. The Fetch Standard requires an "opaque-redirect" type response to a request with a redirect mode of "manual". It doesn't distinguish between valid and invalid redirects here, because validity is only checked when a redirect is followed.

    The Fetch Standard does not let us expose the redirect location to JavaScript. This is the security/privacy boundary in the platform. However it is exposed to the render process as the "internal response", which is the same behaviour as all other opaque responses in Chromium. It is not, and is not intended to be, a protection against a hacked render process getting access to the data.

    As an additional protection against bugs, this CL censors the bad redirect target to "data:", since the only feature of it that is detectable from JavaScript is the fact that it is bad.

    Did that help make it clearer?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Helmut Januschka
    • mmenke
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: If678bf4190e0c0630fe7036f514dab7ce8fa134e
      Gerrit-Change-Number: 7131545
      Gerrit-PatchSet: 20
      Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
      Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
      Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
      Gerrit-CC: Nate Chapin <jap...@chromium.org>
      Gerrit-CC: Yoav Weiss (@Shopify) <yoav...@chromium.org>
      Gerrit-CC: mmenke <mme...@chromium.org>
      Gerrit-Attention: Helmut Januschka <hel...@januschka.com>
      Gerrit-Attention: mmenke <mme...@chromium.org>
      Gerrit-Comment-Date: Thu, 22 Jan 2026 11:41:17 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      mmenke (Gerrit)

      unread,
      Jan 22, 2026, 4:00:30 PM (8 days ago) Jan 22
      to Helmut Januschka, Adam Rice, Yoav Weiss (@Shopify), Nate Chapin, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, kinuko...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, loading-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org
      Attention needed from Helmut Januschka

      mmenke added 5 comments

      Patchset-level comments
      mmenke . resolved

      By the way, Helmut: Good job on tests.

      File net/url_request/url_request_unittest.cc
      Line 6670, Patchset 20 (Latest): d.request_status() == OK);
      mmenke . unresolved

      Is this needed?

      File services/network/cors/cors_url_loader.cc
      mmenke

      Ok, so this is not about protecting callers from data they aren't allowed to access.

      There's still the issue of proxying requests (e.g., maybe the extensions URLLoader proxy machinery explodes on a redirect to a Javascript URL, and now we're giving untrusted renderer processes the ability to make that URLLoader see those URLs).

      Replacing them with just "data:," seems to partially address that (though they could theoretically still explode on empty data URLs, or could even manually parse the location header, if they really wanted, and then explode on that).

      It does make sense that they're allowed to access the response itself, as we have plenty of other permission checks for that.

      File services/network/cors/cors_url_loader_unittest.cc
      Line 2395, Patchset 20 (Latest):// Test that in manual redirect mode with allow_unsafe_redirect_schemes,
      mmenke . unresolved

      nit: Surround variable names that appear in comments with backticks (`)

      Line 2452, Patchset 20 (Latest):
      NotifyLoaderClientOnReceiveRedirect(
      CreateRedirectInfo(302, "GET", file_redirect));
      mmenke . unresolved

      Can this actually happen? URLRequest should fail in this case, right?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Helmut Januschka
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: If678bf4190e0c0630fe7036f514dab7ce8fa134e
      Gerrit-Change-Number: 7131545
      Gerrit-PatchSet: 20
      Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
      Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
      Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
      Gerrit-CC: Nate Chapin <jap...@chromium.org>
      Gerrit-CC: Yoav Weiss (@Shopify) <yoav...@chromium.org>
      Gerrit-CC: mmenke <mme...@chromium.org>
      Gerrit-Attention: Helmut Januschka <hel...@januschka.com>
      Gerrit-Comment-Date: Thu, 22 Jan 2026 21:00:19 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Helmut Januschka (Gerrit)

      unread,
      Jan 22, 2026, 4:14:38 PM (8 days ago) Jan 22
      to Helmut Januschka, Adam Rice, Yoav Weiss (@Shopify), Nate Chapin, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, kinuko...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, loading-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org
      Attention needed from Adam Rice and mmenke

      Helmut Januschka added 5 comments

      Patchset-level comments
      mmenke . resolved

      By the way, Helmut: Good job on tests.

      Helmut Januschka

      thank you 🤗

      File net/url_request/url_request_unittest.cc
      Line 6670, Patchset 20: d.request_status() == OK);
      mmenke . resolved

      Is this needed?

      Helmut Januschka

      Done

      File services/network/cors/cors_url_loader.cc
      Helmut Januschka

      Happy to add additional safeguards if you think of specific cases that need protection.

      File services/network/cors/cors_url_loader_unittest.cc
      Line 2395, Patchset 20:// Test that in manual redirect mode with allow_unsafe_redirect_schemes,
      mmenke . resolved

      nit: Surround variable names that appear in comments with backticks (`)

      Helmut Januschka

      Done


      NotifyLoaderClientOnReceiveRedirect(
      CreateRedirectInfo(302, "GET", file_redirect));
      mmenke . unresolved

      Can this actually happen? URLRequest should fail in this case, right?

      Helmut Januschka

      correct `URLRequest` would reject a redirect to `file://` before reaching `CorsURLLoader` in practice. This test exercises the `CorsURLLoader` code path in isolation to verify it doesn't incorrectly apply censoring when `allow_unsafe_redirect_schemes` is not set.

      i can remove it if you think it doesn tbring in value. WDYT?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Adam Rice
      • mmenke
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: If678bf4190e0c0630fe7036f514dab7ce8fa134e
      Gerrit-Change-Number: 7131545
      Gerrit-PatchSet: 20
      Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
      Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
      Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
      Gerrit-CC: Nate Chapin <jap...@chromium.org>
      Gerrit-CC: Yoav Weiss (@Shopify) <yoav...@chromium.org>
      Gerrit-CC: mmenke <mme...@chromium.org>
      Gerrit-Attention: mmenke <mme...@chromium.org>
      Gerrit-Attention: Adam Rice <ri...@chromium.org>
      Gerrit-Comment-Date: Thu, 22 Jan 2026 21:14:23 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Adam Rice (Gerrit)

      unread,
      Jan 23, 2026, 4:32:06 AM (8 days ago) Jan 23
      to Helmut Januschka, Yoav Weiss (@Shopify), Nate Chapin, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, kinuko...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, loading-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org
      Attention needed from Helmut Januschka and mmenke

      Adam Rice added 3 comments

      Commit Message
      Line 16, Patchset 21 (Latest): - Step 9: "If request's redirect mode is 'manual', then set response to an opaque-redirect filtered response whose internal response is actualResponse."
      Adam Rice . unresolved

      Please wrap these lines too.

      File services/network/cors/cors_url_loader.cc
      Adam Rice

      I looked at the extension APIs a bit. In the old `webRequest` API, the `onBeforeRedirect` event is passed a `redirectUrl` property. The new behaviour will be visible in that `onBeforeRedirect` will be called even for an invalid URL when `fetch()` has been used with manual redirects, and `data:,` will be passed as the `redirectUrl` to the handler.

      Given that the `webRequest` API is deprecated, I'm not sure we need to care about this.

      With the modern `declarativeNetRequest` API the change is almost undetectable. `declarativeNetRequest` doesn't permit interception of `data:,` URLs, so the extension cannot influence the outcome.

      `Content-Security-Policy` is an outlier in the web platform in that it has some visibility of redirects. If a site has a Content-Security-Policy that bans `data:` URLs, and has set up reporting, and the page attempts to do a fetch for something with an invalid redirect, and they have redirects set to manual, then a CSP report will be generated where none would have previously. This seems like an extreme edge case.

      As far as I can tell, DevTools doesn't expose the redirect URL in the UI. Only the Location: header is visible, and we're not changing that. So the impact on DevTools is minimal.

      In conclusion, I don't think we need to take any special action regarding extensions.

      File services/network/cors/cors_url_loader_unittest.cc
      Line 2452, Patchset 20:
      NotifyLoaderClientOnReceiveRedirect(
      CreateRedirectInfo(302, "GET", file_redirect));
      mmenke . unresolved

      Can this actually happen? URLRequest should fail in this case, right?

      Helmut Januschka

      correct `URLRequest` would reject a redirect to `file://` before reaching `CorsURLLoader` in practice. This test exercises the `CorsURLLoader` code path in isolation to verify it doesn't incorrectly apply censoring when `allow_unsafe_redirect_schemes` is not set.

      i can remove it if you think it doesn tbring in value. WDYT?

      Adam Rice

      I think it is okay to keep if you add a comment mentioning that URLRequest shouldn't actually do this in practice. It has some value in clarifying the behaviour.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Helmut Januschka
      • mmenke
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: If678bf4190e0c0630fe7036f514dab7ce8fa134e
      Gerrit-Change-Number: 7131545
      Gerrit-PatchSet: 21
      Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
      Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
      Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
      Gerrit-CC: Nate Chapin <jap...@chromium.org>
      Gerrit-CC: Yoav Weiss (@Shopify) <yoav...@chromium.org>
      Gerrit-CC: mmenke <mme...@chromium.org>
      Gerrit-Attention: Helmut Januschka <hel...@januschka.com>
      Gerrit-Attention: mmenke <mme...@chromium.org>
      Gerrit-Comment-Date: Fri, 23 Jan 2026 09:31:36 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Adam Rice (Gerrit)

      unread,
      Jan 23, 2026, 6:57:37 AM (8 days ago) Jan 23
      to Helmut Januschka, Yoav Weiss (@Shopify), Nate Chapin, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, kinuko...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, loading-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org
      Attention needed from Helmut Januschka and mmenke

      Adam Rice added 1 comment

      File services/network/url_loader_util.cc
      Line 677, Patchset 21 (Latest): url_request.set_treat_all_redirects_as_safe(
      Adam Rice . unresolved

      I think since this is a behaviour change, we do need to put it behind a feature. Please add something like `kDeferCheckingOfUnsafeRedirects` to services/network/public/cpp/features.h. I think the changes are simple enough that we only need to check the feature here and not anywhere else.

      Do you have permissions to create a chromestatus.com entry? I think we can get away with an FYI to blink-dev@ for a change this minor, but it's good to have a chromestatus entry so the behaviour change is documented somewhere.

      Gerrit-Comment-Date: Fri, 23 Jan 2026 11:57:06 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      mmenke (Gerrit)

      unread,
      Jan 23, 2026, 11:23:22 AM (8 days ago) Jan 23
      to Helmut Januschka, Adam Rice, Yoav Weiss (@Shopify), Nate Chapin, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, kinuko...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, loading-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org
      Attention needed from Adam Rice and Helmut Januschka

      mmenke added 1 comment

      File services/network/cors/cors_url_loader.cc
      Line 689, Patchset 7: deferred_redirect_url_ = std::make_unique<GURL>(redirect_info.new_url);
      response_head->response_type = mojom::FetchResponseType::kOpaqueRedirect;
      response_head->timing_allow_passed = !timing_allow_failed_flag_;
      mmenke . resolved
      mmenke

      Thanks for the investigation, Adam! Going to mark this is resolved. I'll sign off once your other comments are addressed.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Adam Rice
      • Helmut Januschka
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: If678bf4190e0c0630fe7036f514dab7ce8fa134e
      Gerrit-Change-Number: 7131545
      Gerrit-PatchSet: 21
      Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
      Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
      Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
      Gerrit-CC: Nate Chapin <jap...@chromium.org>
      Gerrit-CC: Yoav Weiss (@Shopify) <yoav...@chromium.org>
      Gerrit-CC: mmenke <mme...@chromium.org>
      Gerrit-Attention: Helmut Januschka <hel...@januschka.com>
      Gerrit-Attention: Adam Rice <ri...@chromium.org>
      Gerrit-Comment-Date: Fri, 23 Jan 2026 16:23:14 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Helmut Januschka (Gerrit)

      unread,
      Jan 24, 2026, 5:30:41 PM (6 days ago) Jan 24
      to Helmut Januschka, Mirko Bonadei, Jerome Jiang, Adam Rice, Yoav Weiss (@Shopify), Nate Chapin, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, chrome-intell...@chromium.org, jz...@chromium.org, fgal...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, fuzzin...@chromium.org, feature-me...@chromium.org, chrome-intelligence-te...@google.com, cblume...@chromium.org, devtools...@chromium.org, kinuko...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, loading-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org
      Attention needed from Adam Rice and mmenke

      Helmut Januschka added 3 comments

      Commit Message
      Line 16, Patchset 21: - Step 9: "If request's redirect mode is 'manual', then set response to an opaque-redirect filtered response whose internal response is actualResponse."
      Adam Rice . resolved

      Please wrap these lines too.

      Helmut Januschka

      Done

      File services/network/cors/cors_url_loader_unittest.cc
      Line 2452, Patchset 20:
      NotifyLoaderClientOnReceiveRedirect(
      CreateRedirectInfo(302, "GET", file_redirect));
      mmenke . resolved

      Can this actually happen? URLRequest should fail in this case, right?

      Helmut Januschka

      correct `URLRequest` would reject a redirect to `file://` before reaching `CorsURLLoader` in practice. This test exercises the `CorsURLLoader` code path in isolation to verify it doesn't incorrectly apply censoring when `allow_unsafe_redirect_schemes` is not set.

      i can remove it if you think it doesn tbring in value. WDYT?

      Adam Rice

      I think it is okay to keep if you add a comment mentioning that URLRequest shouldn't actually do this in practice. It has some value in clarifying the behaviour.

      Helmut Januschka

      Done

      File services/network/url_loader_util.cc
      Line 677, Patchset 21: url_request.set_treat_all_redirects_as_safe(
      Adam Rice . unresolved

      I think since this is a behaviour change, we do need to put it behind a feature. Please add something like `kDeferCheckingOfUnsafeRedirects` to services/network/public/cpp/features.h. I think the changes are simple enough that we only need to check the feature here and not anywhere else.

      Do you have permissions to create a chromestatus.com entry? I think we can get away with an FYI to blink-dev@ for a change this minor, but it's good to have a chromestatus entry so the behaviour change is documented somewhere.

      Helmut Januschka

      added the feature flag, and set it to off-by-default.
      i can file chromestatus entries, you think this should be a intent to ship (and then switching it to on-by-default)?

      or should it be on-by-default, and just a PSA email to @blink-dev? (and we have feature flag for kill-switching)

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Adam Rice
      • mmenke
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: If678bf4190e0c0630fe7036f514dab7ce8fa134e
      Gerrit-Change-Number: 7131545
      Gerrit-PatchSet: 25
      Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
      Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
      Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
      Gerrit-CC: Jerome Jiang <ji...@chromium.org>
      Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
      Gerrit-CC: Nate Chapin <jap...@chromium.org>
      Gerrit-CC: Yoav Weiss (@Shopify) <yoav...@chromium.org>
      Gerrit-CC: mmenke <mme...@chromium.org>
      Gerrit-Attention: mmenke <mme...@chromium.org>
      Gerrit-Attention: Adam Rice <ri...@chromium.org>
      Gerrit-Comment-Date: Sat, 24 Jan 2026 22:30:20 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      mmenke (Gerrit)

      unread,
      Jan 26, 2026, 10:11:25 AM (5 days ago) Jan 26
      to Helmut Januschka, Mirko Bonadei, Jerome Jiang, Adam Rice, Yoav Weiss (@Shopify), Nate Chapin, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, chrome-intell...@chromium.org, jz...@chromium.org, fgal...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, fuzzin...@chromium.org, feature-me...@chromium.org, chrome-intelligence-te...@google.com, cblume...@chromium.org, devtools...@chromium.org, kinuko...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, loading-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org
      Attention needed from Adam Rice and Helmut Januschka

      mmenke voted and added 1 comment

      Votes added by mmenke

      Code-Review+1

      1 comment

      Patchset-level comments
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Adam Rice
      • Helmut Januschka
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: If678bf4190e0c0630fe7036f514dab7ce8fa134e
        Gerrit-Change-Number: 7131545
        Gerrit-PatchSet: 25
        Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
        Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
        Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
        Gerrit-Reviewer: mmenke <mme...@chromium.org>
        Gerrit-CC: Jerome Jiang <ji...@chromium.org>
        Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
        Gerrit-CC: Nate Chapin <jap...@chromium.org>
        Gerrit-CC: Yoav Weiss (@Shopify) <yoav...@chromium.org>
        Gerrit-Attention: Helmut Januschka <hel...@januschka.com>
        Gerrit-Attention: Adam Rice <ri...@chromium.org>
        Gerrit-Comment-Date: Mon, 26 Jan 2026 15:11:18 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Adam Rice (Gerrit)

        unread,
        Jan 27, 2026, 2:35:29 AM (4 days ago) Jan 27
        to Helmut Januschka, Mirko Bonadei, Jerome Jiang, Yoav Weiss (@Shopify), Nate Chapin, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, chrome-intell...@chromium.org, jz...@chromium.org, fgal...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, fuzzin...@chromium.org, feature-me...@chromium.org, chrome-intelligence-te...@google.com, cblume...@chromium.org, devtools...@chromium.org, kinuko...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, loading-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org
        Attention needed from Helmut Januschka

        Adam Rice voted and added 2 comments

        Votes added by Adam Rice

        Code-Review+1

        2 comments

        Patchset-level comments
        Adam Rice . resolved

        lgtm!

        File services/network/url_loader_util.cc
        Line 677, Patchset 21: url_request.set_treat_all_redirects_as_safe(
        Adam Rice . unresolved

        I think since this is a behaviour change, we do need to put it behind a feature. Please add something like `kDeferCheckingOfUnsafeRedirects` to services/network/public/cpp/features.h. I think the changes are simple enough that we only need to check the feature here and not anywhere else.

        Do you have permissions to create a chromestatus.com entry? I think we can get away with an FYI to blink-dev@ for a change this minor, but it's good to have a chromestatus entry so the behaviour change is documented somewhere.

        Helmut Januschka

        added the feature flag, and set it to off-by-default.
        i can file chromestatus entries, you think this should be a intent to ship (and then switching it to on-by-default)?

        or should it be on-by-default, and just a PSA email to @blink-dev? (and we have feature flag for kill-switching)

        Adam Rice

        I think a PSA is probably acceptable. If it was me I'd probably do an "Intent to Ship" anyway, just because by the time you've created the chromestatus entry it's not that much more work. But I will let you decide which you'd rather do.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Helmut Januschka
        Gerrit-Comment-Date: Tue, 27 Jan 2026 07:35:00 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        Comment-In-Reply-To: Helmut Januschka <hel...@januschka.com>
        Comment-In-Reply-To: Adam Rice <ri...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Helmut Januschka (Gerrit)

        unread,
        Jan 28, 2026, 7:07:08 PM (2 days ago) Jan 28
        to Helmut Januschka, Adam Rice, Mirko Bonadei, Jerome Jiang, Yoav Weiss (@Shopify), Nate Chapin, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, chrome-intell...@chromium.org, jz...@chromium.org, fgal...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, fuzzin...@chromium.org, feature-me...@chromium.org, chrome-intelligence-te...@google.com, cblume...@chromium.org, devtools...@chromium.org, kinuko...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, loading-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org
        Attention needed from Adam Rice

        Helmut Januschka added 1 comment

        File services/network/url_loader_util.cc
        Line 677, Patchset 21: url_request.set_treat_all_redirects_as_safe(
        Adam Rice . unresolved

        I think since this is a behaviour change, we do need to put it behind a feature. Please add something like `kDeferCheckingOfUnsafeRedirects` to services/network/public/cpp/features.h. I think the changes are simple enough that we only need to check the feature here and not anywhere else.

        Do you have permissions to create a chromestatus.com entry? I think we can get away with an FYI to blink-dev@ for a change this minor, but it's good to have a chromestatus entry so the behaviour change is documented somewhere.

        Helmut Januschka

        added the feature flag, and set it to off-by-default.
        i can file chromestatus entries, you think this should be a intent to ship (and then switching it to on-by-default)?

        or should it be on-by-default, and just a PSA email to @blink-dev? (and we have feature flag for kill-switching)

        Adam Rice

        I think a PSA is probably acceptable. If it was me I'd probably do an "Intent to Ship" anyway, just because by the time you've created the chromestatus entry it's not that much more work. But I will let you decide which you'd rather do.

        Helmut Januschka

        done https://chromestatus.com/feature/5098938002702336 - i'll wait till all is green and then land CL

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Adam Rice
        Gerrit-Attention: Adam Rice <ri...@chromium.org>
        Gerrit-Comment-Date: Thu, 29 Jan 2026 00:06:49 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        gwsq (Gerrit)

        unread,
        Jan 28, 2026, 7:23:56 PM (2 days ago) Jan 28
        to Helmut Januschka, Chromium IPC Reviews, Mike West, Christian Biesinger, Kouhei Ueno, Adam Rice, Mirko Bonadei, Jerome Jiang, Yoav Weiss (@Shopify), Nate Chapin, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, chrome-intell...@chromium.org, jz...@chromium.org, fgal...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, fuzzin...@chromium.org, feature-me...@chromium.org, chrome-intelligence-te...@google.com, cblume...@chromium.org, devtools...@chromium.org, kinuko...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, loading-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org
        Attention needed from Adam Rice, Christian Biesinger, Kouhei Ueno and Mike West

        Message from gwsq

        From googleclient/chrome/chromium_gwsq/ipc/config.gwsq:
        IPC: mk...@chromium.org

        📎 It looks like you’re making a possibly security-sensitive change! 📎 IPC security review isn’t a rubberstamp, so your friendly security reviewer will need a fair amount of context to review your CL effectively. Please review your CL description and code comments to make sure they provide context for someone unfamiliar with your project/area. Pay special attention to where data comes from and which processes it flows between (and their privilege levels). Feel free to point your security reviewer at design docs, bugs, or other links if you can’t reasonably make a self-contained CL description. (Also see https://cbea.ms/git-commit/).

        IPC reviewer(s): mk...@chromium.org


        Reviewer source(s):
        mk...@chromium.org is from context(googleclient/chrome/chromium_gwsq/ipc/config.gwsq)

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Adam Rice
        • Christian Biesinger
        • Kouhei Ueno
        • Mike West
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: If678bf4190e0c0630fe7036f514dab7ce8fa134e
        Gerrit-Change-Number: 7131545
        Gerrit-PatchSet: 25
        Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
        Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
        Gerrit-Reviewer: Christian Biesinger <cbies...@chromium.org>
        Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
        Gerrit-Reviewer: Kouhei Ueno <kou...@chromium.org>
        Gerrit-Reviewer: Mike West <mk...@chromium.org>
        Gerrit-Reviewer: mmenke <mme...@chromium.org>
        Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
        Gerrit-CC: Jerome Jiang <ji...@chromium.org>
        Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
        Gerrit-CC: Nate Chapin <jap...@chromium.org>
        Gerrit-CC: Yoav Weiss (@Shopify) <yoav...@chromium.org>
        Gerrit-CC: gwsq
        Gerrit-Attention: Mike West <mk...@chromium.org>
        Gerrit-Attention: Christian Biesinger <cbies...@chromium.org>
        Gerrit-Attention: Adam Rice <ri...@chromium.org>
        Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
        Gerrit-Comment-Date: Thu, 29 Jan 2026 00:23:19 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Mike West (Gerrit)

        unread,
        Jan 29, 2026, 7:31:08 AM (yesterday) Jan 29
        to Helmut Januschka, Chromium IPC Reviews, Christian Biesinger, Kouhei Ueno, Adam Rice, Mirko Bonadei, Jerome Jiang, Yoav Weiss (@Shopify), Nate Chapin, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, chrome-intell...@chromium.org, jz...@chromium.org, fgal...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, fuzzin...@chromium.org, feature-me...@chromium.org, chrome-intelligence-te...@google.com, cblume...@chromium.org, devtools...@chromium.org, kinuko...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, loading-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org
        Attention needed from Adam Rice, Christian Biesinger, Helmut Januschka and Kouhei Ueno

        Mike West added 1 comment

        File services/network/public/mojom/url_request.mojom
        Line 358, Patchset 25 (Latest): // See https://fetch.spec.whatwg.org/#http-redirect-fetch step 9.
        Mike West . unresolved

        This looks reasonable from a mojo perspective, but I wonder how necessary this attribute is. If the goal is to support this for all non-navigational requests whose redirect-mode is `manual`, you could look at the request's `destination` rather than passing another boolean along (e.g. `fetch()` will result in a request whose destination is `kEmpty`). Did you consider that approach?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Adam Rice
        • Christian Biesinger
        • Helmut Januschka
        • Kouhei Ueno
        Gerrit-Attention: Helmut Januschka <hel...@januschka.com>
        Gerrit-Attention: Christian Biesinger <cbies...@chromium.org>
        Gerrit-Attention: Adam Rice <ri...@chromium.org>
        Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
        Gerrit-Comment-Date: Thu, 29 Jan 2026 12:31:01 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Helmut Januschka (Gerrit)

        unread,
        Jan 29, 2026, 5:47:48 PM (yesterday) Jan 29
        to Helmut Januschka, Chromium IPC Reviews, Mike West, Christian Biesinger, Kouhei Ueno, Adam Rice, Mirko Bonadei, Jerome Jiang, Yoav Weiss (@Shopify), Nate Chapin, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, chrome-intell...@chromium.org, jz...@chromium.org, fgal...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, fuzzin...@chromium.org, feature-me...@chromium.org, chrome-intelligence-te...@google.com, cblume...@chromium.org, devtools...@chromium.org, kinuko...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, loading-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org
        Attention needed from Adam Rice, Christian Biesinger, Kouhei Ueno, Mike West and mmenke

        Helmut Januschka added 1 comment

        File services/network/public/mojom/url_request.mojom

        This looks reasonable from a mojo perspective, but I wonder how necessary this attribute is. If the goal is to support this for all non-navigational requests whose redirect-mode is `manual`, you could look at the request's `destination` rather than passing another boolean along (e.g. `fetch()` will result in a request whose destination is `kEmpty`). Did you consider that approach?

        Helmut Januschka

        way better, thanks!!

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Adam Rice
        • Christian Biesinger
        • Kouhei Ueno
        • Mike West
        • mmenke
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: If678bf4190e0c0630fe7036f514dab7ce8fa134e
          Gerrit-Change-Number: 7131545
          Gerrit-PatchSet: 26
          Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
          Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
          Gerrit-Reviewer: Christian Biesinger <cbies...@chromium.org>
          Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
          Gerrit-Reviewer: Kouhei Ueno <kou...@chromium.org>
          Gerrit-Reviewer: Mike West <mk...@chromium.org>
          Gerrit-Reviewer: mmenke <mme...@chromium.org>
          Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
          Gerrit-CC: Jerome Jiang <ji...@chromium.org>
          Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
          Gerrit-CC: Nate Chapin <jap...@chromium.org>
          Gerrit-CC: Yoav Weiss (@Shopify) <yoav...@chromium.org>
          Gerrit-CC: gwsq
          Gerrit-Attention: mmenke <mme...@chromium.org>
          Gerrit-Attention: Mike West <mk...@chromium.org>
          Gerrit-Attention: Christian Biesinger <cbies...@chromium.org>
          Gerrit-Attention: Adam Rice <ri...@chromium.org>
          Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
          Gerrit-Comment-Date: Thu, 29 Jan 2026 22:47:42 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Mike West <mk...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Mike West (Gerrit)

          unread,
          1:22 AM (22 hours ago) 1:22 AM
          to Helmut Januschka, Chromium IPC Reviews, Christian Biesinger, Kouhei Ueno, Adam Rice, Mirko Bonadei, Jerome Jiang, Yoav Weiss (@Shopify), Nate Chapin, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, chrome-intell...@chromium.org, jz...@chromium.org, fgal...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, fuzzin...@chromium.org, feature-me...@chromium.org, chrome-intelligence-te...@google.com, cblume...@chromium.org, devtools...@chromium.org, kinuko...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, loading-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org
          Attention needed from Adam Rice, Christian Biesinger, Helmut Januschka, Kouhei Ueno and mmenke

          Mike West voted and added 3 comments

          Votes added by Mike West

          Code-Review+1

          3 comments

          Patchset-level comments
          File-level comment, Patchset 26 (Latest):
          Mike West . resolved

          This approach looks good, so I'll stamp the CL (not that you need it anymore, since you dropped the mojo bits :) ), but I do have a suggestion for improvement that's inlined below (tl;dr: check `mode` rather than `destination`).

          I'd also suggest that it would be helpful to ensure we have a negative test for the `fetch()` behavior. We might already have one somewhere, but I would have expected to see an update to some `-expected.txt` somewhere.

          Commit Message
          Line 20, Patchset 26 (Latest): redirect target, making the safety check unnecessary.
          Mike West . unresolved

          This reference seems out of date. I think you now want to refer to step 6.2 of https://fetch.spec.whatwg.org/#http-fetch?

          That spec text also suggests a better option than I gave you earlier: the request's `mode` should be [`kNavigate`](https://source.chromium.org/chromium/chromium/src/+/main:services/network/public/mojom/fetch_api.mojom;drc=d60984dee3a5102a2f7b42f0f6ac329b900bee7b;l=17). That should be more exhaustive than comparing against the request destination used for `fetch()`.

          File services/network/cors/cors_url_loader.cc
          Line 703, Patchset 26 (Latest): if (request_.destination == mojom::RequestDestination::kEmpty &&
          Mike West . unresolved

          See the suggestion above to compare against the request's `mode` rather than the destination. I think we'd otherwise need to invert this check to check whether the destination wasn't one of the navigational types (document, iframe, frame, embed, object? Maybe others I'm forgetting?). Checking the mode seems simpler and more in-line with the specification.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Adam Rice
          • Christian Biesinger
          • Helmut Januschka
          • Kouhei Ueno
          • mmenke
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not satisfiedCode-Owners
            • requirement satisfiedCode-Review
            • requirement is not satisfiedNo-Unresolved-Comments
            • requirement satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: If678bf4190e0c0630fe7036f514dab7ce8fa134e
            Gerrit-Change-Number: 7131545
            Gerrit-PatchSet: 26
            Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
            Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
            Gerrit-Reviewer: Christian Biesinger <cbies...@chromium.org>
            Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
            Gerrit-Reviewer: Kouhei Ueno <kou...@chromium.org>
            Gerrit-Reviewer: Mike West <mk...@chromium.org>
            Gerrit-Reviewer: mmenke <mme...@chromium.org>
            Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
            Gerrit-CC: Jerome Jiang <ji...@chromium.org>
            Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
            Gerrit-CC: Nate Chapin <jap...@chromium.org>
            Gerrit-CC: Yoav Weiss (@Shopify) <yoav...@chromium.org>
            Gerrit-CC: gwsq
            Gerrit-Attention: Helmut Januschka <hel...@januschka.com>
            Gerrit-Attention: mmenke <mme...@chromium.org>
            Gerrit-Attention: Christian Biesinger <cbies...@chromium.org>
            Gerrit-Attention: Adam Rice <ri...@chromium.org>
            Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
            Gerrit-Comment-Date: Fri, 30 Jan 2026 06:22:32 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Christian Biesinger (Gerrit)

            unread,
            10:56 AM (13 hours ago) 10:56 AM
            to Helmut Januschka, Christian Biesinger, Mike West, Chromium IPC Reviews, Kouhei Ueno, Adam Rice, Mirko Bonadei, Jerome Jiang, Yoav Weiss (@Shopify), Nate Chapin, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, chrome-intell...@chromium.org, jz...@chromium.org, fgal...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, fuzzin...@chromium.org, feature-me...@chromium.org, chrome-intelligence-te...@google.com, cblume...@chromium.org, devtools...@chromium.org, kinuko...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, loading-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org
            Attention needed from Adam Rice, Helmut Januschka, Kouhei Ueno and mmenke

            Christian Biesinger voted and added 1 comment

            Votes added by Christian Biesinger

            Code-Review+1

            1 comment

            Patchset-level comments
            Christian Biesinger . resolved

            virtual test suites lgtm, didn't look at the rest

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Adam Rice
            • Helmut Januschka
            • Kouhei Ueno
            • mmenke
              Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement satisfiedCode-Owners
              Gerrit-Attention: Adam Rice <ri...@chromium.org>
              Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
              Gerrit-Comment-Date: Fri, 30 Jan 2026 15:56:04 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Helmut Januschka (Gerrit)

              unread,
              6:51 PM (5 hours ago) 6:51 PM
              to Helmut Januschka, Christian Biesinger, Mike West, Chromium IPC Reviews, Kouhei Ueno, Adam Rice, Mirko Bonadei, Jerome Jiang, Yoav Weiss (@Shopify), Nate Chapin, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, chrome-intell...@chromium.org, jz...@chromium.org, fgal...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, fuzzin...@chromium.org, feature-me...@chromium.org, chrome-intelligence-te...@google.com, cblume...@chromium.org, devtools...@chromium.org, kinuko...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, loading-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, net-r...@chromium.org, network-ser...@chromium.org
              Attention needed from Adam Rice, Kouhei Ueno and mmenke

              Helmut Januschka added 3 comments

              Patchset-level comments
              Mike West . resolved

              This approach looks good, so I'll stamp the CL (not that you need it anymore, since you dropped the mojo bits :) ), but I do have a suggestion for improvement that's inlined below (tl;dr: check `mode` rather than `destination`).

              I'd also suggest that it would be helpful to ensure we have a negative test for the `fetch()` behavior. We might already have one somewhere, but I would have expected to see an update to some `-expected.txt` somewhere.

              Helmut Januschka

              `ManualRedirectWithoutFlagDoesNotCensor` is the negative test

              Commit Message
              Line 20, Patchset 26: redirect target, making the safety check unnecessary.
              Mike West . resolved

              This reference seems out of date. I think you now want to refer to step 6.2 of https://fetch.spec.whatwg.org/#http-fetch?

              That spec text also suggests a better option than I gave you earlier: the request's `mode` should be [`kNavigate`](https://source.chromium.org/chromium/chromium/src/+/main:services/network/public/mojom/fetch_api.mojom;drc=d60984dee3a5102a2f7b42f0f6ac329b900bee7b;l=17). That should be more exhaustive than comparing against the request destination used for `fetch()`.

              Helmut Januschka

              Done

              File services/network/cors/cors_url_loader.cc
              Line 703, Patchset 26: if (request_.destination == mojom::RequestDestination::kEmpty &&
              Mike West . resolved

              See the suggestion above to compare against the request's `mode` rather than the destination. I think we'd otherwise need to invert this check to check whether the destination wasn't one of the navigational types (document, iframe, frame, embed, object? Maybe others I'm forgetting?). Checking the mode seems simpler and more in-line with the specification.

              Helmut Januschka

              Done

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Adam Rice
              • Kouhei Ueno
              • mmenke
              Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement satisfiedCode-Owners
              • requirement satisfiedCode-Review
              • requirement is not satisfiedNo-Unresolved-Comments
              • requirement satisfiedReview-Enforcement
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: chromium/src
              Gerrit-Branch: main
              Gerrit-Change-Id: If678bf4190e0c0630fe7036f514dab7ce8fa134e
              Gerrit-Change-Number: 7131545
              Gerrit-PatchSet: 28
              Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
              Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
              Gerrit-Reviewer: Christian Biesinger <cbies...@chromium.org>
              Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
              Gerrit-Reviewer: Kouhei Ueno <kou...@chromium.org>
              Gerrit-Reviewer: Mike West <mk...@chromium.org>
              Gerrit-Reviewer: mmenke <mme...@chromium.org>
              Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
              Gerrit-CC: Jerome Jiang <ji...@chromium.org>
              Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
              Gerrit-CC: Nate Chapin <jap...@chromium.org>
              Gerrit-CC: Yoav Weiss (@Shopify) <yoav...@chromium.org>
              Gerrit-CC: gwsq
              Gerrit-Attention: mmenke <mme...@chromium.org>
              Gerrit-Attention: Adam Rice <ri...@chromium.org>
              Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
              Gerrit-Comment-Date: Fri, 30 Jan 2026 23:51:42 +0000
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy
              Reply all
              Reply to author
              Forward
              0 new messages