Sanitize more commit params for cross-origin redirects. [chromium/src : main]

0 views
Skip to first unread message

Liam Brady (Gerrit)

unread,
Apr 22, 2026, 12:56:45 PMApr 22
to Charlie Reis, Nate Chapin, Chromium LUCI CQ, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, blink-re...@chromium.org, blink-revie...@chromium.org, kinuko...@chromium.org, gavinp...@chromium.org, blink-rev...@chromium.org, blink-revi...@chromium.org, loading...@chromium.org, blink-...@chromium.org, loading-re...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, navigation...@chromium.org
Attention needed from Charlie Reis

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • Charlie Reis
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: I3ef9284d5b90f6b451a5a117d3a2c97168ee6129
Gerrit-Change-Number: 7765993
Gerrit-PatchSet: 13
Gerrit-Owner: Liam Brady <lbr...@google.com>
Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
Gerrit-Reviewer: Liam Brady <lbr...@google.com>
Gerrit-CC: Nate Chapin <jap...@chromium.org>
Gerrit-Attention: Charlie Reis <cr...@chromium.org>
Gerrit-Comment-Date: Wed, 22 Apr 2026 16:56:39 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Charlie Reis (Gerrit)

unread,
Apr 22, 2026, 8:50:11 PMApr 22
to Liam Brady, Alex Moshchuk, Nate Chapin, Chromium LUCI CQ, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, blink-re...@chromium.org, blink-revie...@chromium.org, kinuko...@chromium.org, gavinp...@chromium.org, blink-rev...@chromium.org, blink-revi...@chromium.org, loading...@chromium.org, blink-...@chromium.org, loading-re...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, navigation...@chromium.org
Attention needed from Liam Brady

Charlie Reis added 17 comments

Patchset-level comments
File-level comment, Patchset 13 (Latest):
Charlie Reis . resolved

Thanks for diving into this! Redirects (and how existing code depends on them) can be tricky, and it's good that you've identified a few places that would need to be updated to allow the sanitization.

I think we may want to use those cases to think about how to structure the change, per the comments below. It's good to know that the current approaches are enough to pass the try jobs, but I'm a bit nervous about adding the state and how the silent rewriting is done, which might make the redirect code (even) harder to reason about. :)

Commit Message
Line 16, Patchset 13 (Latest):This CL sanitizes those fields.
Charlie Reis . unresolved

I think it's worth a step back here. Many of the changes below seem like they could introduce races, edge cases, or other bugs, and it's not obvious what invariant change we're aiming for.

From skimming the bug and CL, it sounds like we pass full URLs (in location headers and original URL params) from browser to renderer and back again, today. IIUC, it seems like the goal is to only send origins to the renderer, and the approach to keep things working is to preserve the full URLs on the browser side for when they are needed later in the navigation. Is that right?

If so, I'm wondering if we can be more explicit about what we are sending to the renderer going forward. Can we make it clear it's an origin and not a full URL, rather than silently converting between the two types of values, to avoid confusion of what's in the param?

(For that matter, does the renderer actually need the origin, or could the whole thing just be a placeholder/token or even be removed entirely from commit params if the real value is only needed back in the browser process?)

Line 20, Patchset 13 (Latest): navigation_id to the renderer and maps them to full URLs in the parent
Charlie Reis . unresolved

As you noted, I think we'd probably prefer an unguessable token than sending an actual unique ID from the browser process to the renderer. (That's if we conclude that we do need the state; we may want to discuss that more first.)

Line 27, Patchset 13 (Latest): in for sanitizing `original_url` to prevent the non-standard
Charlie Reis . unresolved

nit: Drop "in"? (I'm not sure, but it seems like there's a typo here.)

Line 36, Patchset 13 (Latest):
Charlie Reis . unresolved

This does seem like a fairly high risk change, so I imagine we'll want to flag guard it. I'm not sure how easy that is, so we can try to settle on the approach before adding all of that complexity.

File content/browser/renderer_host/navigation_request.cc
Line 1231, Patchset 13 (Latest):// Helper to get the origin of a URL for sanitization purposes.
Charlie Reis . unresolved
We should probably make these helpers more clearly about redirect sanitization, since sanitization is ambiguous and sounds like it might need to be used in more places.

This collection of helpers might also be good to move somewhere more specific to IPC security than NavigationRequest, though I'm not sure. We do have ipc_utils.cc for somewhat similar verification code, as one possibiliy.
Line 1234, Patchset 13 (Latest):// DeprecatedGetOriginAsURL() returns an empty URL for non-standard schemes.
Charlie Reis . unresolved

Is there a way to give an example? At first glance it's hard to know why this is needed and whether it's sufficient.

Line 1537, Patchset 13 (Latest): /*navigation_id=*/0);
Charlie Reis . unresolved

I'm nervous about this. :) It seems hard to reason about having to pass this parameter around when many places don't assign it.

Line 1947, Patchset 13 (Latest): ->SetNavigationIdForChild(
Charlie Reis . unresolved

I'd really like to avoid storing this as state in the renderer if possible. That creates chances for the state to get out of sync or be stale (or lied about), on top of all the plumbing it requires. Let's chat about possible approaches to see if we can avoid it.

Line 6652, Patchset 13 (Latest): GetRenderFrameHost()->set_navigation_original_url(
Charlie Reis . unresolved

This doesn't really fit with the comment above. Should it move into the helper function, if all the callers have to do it? (That's assuming we keep the value, which I'm separately wondering about.)

Line 8074, Patchset 13 (Latest): if (!AreSameOriginForSanitization(commit_params->original_url,
Charlie Reis . unresolved

I'm curious: Nasko's previous code cropped everything down to an origin, without a same-origin check. Should we be consistent across the cases?

Line 8091, Patchset 13 (Latest): const GURL& next_url = commit_params->redirects[i + 1];
Charlie Reis . unresolved

I'm not sure I follow the `i+1` part at first glance, so it might be worth having comments about why it's needed.

File content/browser/renderer_host/render_frame_host_impl.h
Line 5154, Patchset 13 (Latest): GURL navigation_original_url_;
Charlie Reis . unresolved

It's generally not great to store navigation state on RFH-- that's what NavigationRequest is for. Is it actually needed after the navigation completes, and how does that work today?

Also, is it actually test-specific, or do real observers depend on the value? If it's only for tests, maybe we can find a fix in the test framework that doesn't require new state on RFH.

File content/browser/renderer_host/render_frame_host_impl.cc
Line 11745, Patchset 13 (Latest): resource_load_info->original_url = navigation_original_url_;
Charlie Reis . unresolved

This is where I'm wondering if we can be more explicit about what's sent to the renderer and what's stored in the browser. It seems confusing to have one named variable with different types of values depending on where we are in the navigation flow.

If the authoritative copy lives in the browser and we can just send either an Origin or a placeholder to the renderer under a different name, then it might help to be explicit about that in the data structures.

File third_party/blink/renderer/core/html/html_frame_owner_element.h
Line 272, Patchset 13 (Latest): KURL pending_navigation_url_;
Charlie Reis . unresolved

I'm also concerned about storing the pending navigation URL (along with the previous comment about the ID), since these both seem easy to get wrong or use incorrectly.

File third_party/blink/renderer/core/html/html_frame_owner_element.cc
Line 558, Patchset 13 (Latest): // TODO(crbug.com/1410705): fix this properly by moving IFrame reporting to
Charlie Reis . unresolved

Interesting-- is the code below still needed at all? The bug in this TODO is marked fixed, so I'm curious if we can remove it instead of adding the state.

Line 582, Patchset 13 (Latest): pending_navigation_url_ = KURL(fallback_timing_info_->name);
Charlie Reis . unresolved

I'm not sure I understand how `name` and `url` are related here.

Open in Gerrit

Related details

Attention is currently required from:
  • Liam Brady
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: I3ef9284d5b90f6b451a5a117d3a2c97168ee6129
    Gerrit-Change-Number: 7765993
    Gerrit-PatchSet: 13
    Gerrit-Owner: Liam Brady <lbr...@google.com>
    Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
    Gerrit-Reviewer: Liam Brady <lbr...@google.com>
    Gerrit-CC: Alex Moshchuk <ale...@chromium.org>
    Gerrit-CC: Nasko Oskov <na...@chromium.org>
    Gerrit-Attention: Liam Brady <lbr...@google.com>
    Gerrit-Comment-Date: Thu, 23 Apr 2026 00:50:05 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Liam Brady (Gerrit)

    unread,
    May 15, 2026, 8:22:17 PMMay 15
    to Daniel Cheng, Zijie He, Alex Moshchuk, Charlie Reis, Nate Chapin, Chromium LUCI CQ, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, bmcquad...@chromium.org, net-r...@chromium.org, fuchsia...@chromium.org, loading-rev...@chromium.org, halliwe...@chromium.org, csharris...@chromium.org, vasilii+watchlis...@chromium.org, speed-metrics...@chromium.org, gcasto+w...@chromium.org, core-timi...@chromium.org, speed-metr...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, kinuko...@chromium.org, gavinp...@chromium.org, blink-rev...@chromium.org, blink-revi...@chromium.org, loading...@chromium.org, blink-...@chromium.org, loading-re...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, navigation...@chromium.org

    Liam Brady abandoned this change.

    View Change

    Abandoned This is going to be split out into multiple CLs as the complexity has ballooned.

    Liam Brady abandoned this change

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • 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: abandon
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I3ef9284d5b90f6b451a5a117d3a2c97168ee6129
    Gerrit-Change-Number: 7765993
    Gerrit-PatchSet: 15
    Gerrit-Owner: Liam Brady <lbr...@google.com>
    Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
    Gerrit-Reviewer: Liam Brady <lbr...@google.com>
    Gerrit-CC: Alex Moshchuk <ale...@chromium.org>
    Gerrit-CC: Daniel Cheng <dch...@chromium.org>
    Gerrit-CC: Nasko Oskov <na...@chromium.org>
    Gerrit-CC: Nate Chapin <jap...@chromium.org>
    Gerrit-CC: Zijie He <zij...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Liam Brady (Gerrit)

    unread,
    May 15, 2026, 8:25:01 PMMay 15
    to Charlie Reis, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Nate Chapin, alexmo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, creis...@chromium.org, gavinp...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org, navigation...@chromium.org
    Attention needed from Charlie Reis

    New activity on the change

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Charlie Reis
    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: I87a086725cf8b3acbdfea94cacbbb72e56033f23
    Gerrit-Change-Number: 7851593
    Gerrit-PatchSet: 1
    Gerrit-Owner: Liam Brady <lbr...@google.com>
    Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
    Gerrit-Reviewer: Liam Brady <lbr...@google.com>
    Gerrit-CC: Nate Chapin <jap...@chromium.org>
    Gerrit-Attention: Charlie Reis <cr...@chromium.org>
    Gerrit-Comment-Date: Sat, 16 May 2026 00:24:49 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Charlie Reis (Gerrit)

    unread,
    May 18, 2026, 5:03:42 PMMay 18
    to Liam Brady, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Nate Chapin, alexmo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, creis...@chromium.org, gavinp...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org, navigation...@chromium.org
    Attention needed from Liam Brady

    Charlie Reis added 14 comments

    Patchset-level comments
    File-level comment, Patchset 2 (Latest):
    Charlie Reis . resolved

    Thanks! I'm happy with the approach to land the non-working feature in a disabled state, if we're reasonably confident that we've caught the places that need sanitizing. Basically looks good with some comment suggestions and a few questions.

    Commit Message
    Line 18, Patchset 2 (Latest):Some features will break as a result of this change and will need to be
    Charlie Reis . unresolved

    Let's clarify that this CL isn't actively breaking anything-- it's just that the disabled-by-default feature introduced here can't be enabled until these features have been updated.

    Line 22, Patchset 2 (Latest):`original_origin` field, which will happen once all features are working
    Charlie Reis . unresolved

    Might be worth mentioning your plan to make it an Origin type after the conversion as well, since it's still a GURL for now.

    Out of curiosity, have you attempted a draft CL that changes the type (e.g., without bothering with a feature flag), just to see the extent of the changes and have a better sense that the conversion is going to work?

    (The approach in this CL has a nice small delta, but it doesn't give a lot of confidence that we've looked at the places that could be affected.)

    File content/browser/renderer_host/navigation_controller_impl.cc
    Line 4631, Patchset 2 (Latest): ? common_params->url.DeprecatedGetOriginAsURL()
    Charlie Reis . unresolved

    This is generally not a safe function to call, but I think it's consistent with what Nasko was doing. Can you include a comment above this block similar to https://source.chromium.org/chromium/chromium/src/+/main:content/browser/renderer_host/navigation_request.cc;drc=dbf362a812f4e3822fac968906d87a77d07d6a84;l=7950-7953 to explain why it's ok?

    Probably the same in the other places where we call this.

    File content/browser/renderer_host/navigation_request.cc
    Line 269, Patchset 2 (Latest):// See https://crbug.com/40095391 https://crbug.com/495463654.
    Charlie Reis . unresolved

    Should we revert these changes? It looks like the other flags are defined elsewhere now, and we're not modifying this flag or how it's used.

    Line 7787, Patchset 2 (Latest): commit_params_->original_url = common_params_->url;
    Charlie Reis . unresolved

    All of these places seem reasonable to me, though I'm not sure how to tell that we caught them all. (Maybe the earlier idea of a draft CL where we change the type to Origin would help with that?)

    Line 8048, Patchset 2 (Latest): url::Origin final_origin = url::Origin::Create(common_params_->url);
    Charlie Reis . unresolved

    This is also potentially a bit fraught:

    1) Are we ok not handling any cases that inherit an origin, like about:blank? Maybe those will never have Location headers as part of a redirect chain?

    2) Should we be sanitizing if we cross a CSP sandbox boundary?

    It's possible we could get by with a comment like the other cases, but I'm curious if a TODO is needed.

    File content/browser/renderer_host/navigation_request_unittest.cc
    Line 970, Patchset 2 (Latest):}
    Charlie Reis . unresolved

    Can these new tests also be checking original_url?

    Line 982, Patchset 2 (Latest): url::AddStandardScheme("chrome-native", url::SCHEME_WITH_HOST);
    Charlie Reis . unresolved

    Does this depend on actually being chrome-native (which I didn't think had much support in content/, though it looks like some [metrics code](https://chromium-review.googlesource.com/c/chromium/src/+/6173196) knows about it), or can we make something up like chrome-foo?

    Line 1054, Patchset 2 (Latest): // 1. Redirect to data: URL.
    Charlie Reis . resolved

    (Technically only extensions can do this, but it's a good test. Probably better not to mention extensions in the comment since this test is in content/.)

    Line 1091, Patchset 2 (Latest): /*disabled_features=*/{});
    Charlie Reis . unresolved

    Should this test verify anything about Location headers or original_url? Otherwise I'm not sure why these features need to be enabled.

    File content/common/features.cc
    Line 672, Patchset 2 (Latest):// to only include the origin when cross-origin to the final URL.
    Charlie Reis . unresolved

    Let's include the bug number here and below.

    File content/renderer/render_frame_impl.cc
    Line 496, Patchset 2 (Latest): // original URL).
    Charlie Reis . unresolved

    I wonder if we can clarify this at all. I think the second sentence is correct and that we always have the full final URL in non-redirecting cases. Is the first sentence wrong if the feature is enabled, since we're using just an original origin in that case?

    File third_party/blink/renderer/platform/loader/fetch/url_loader/navigation_body_loader.cc
    Line 626, Patchset 2 (Latest): // the same as the original URL).
    Charlie Reis . unresolved

    Same here.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Liam Brady
    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: I87a086725cf8b3acbdfea94cacbbb72e56033f23
      Gerrit-Change-Number: 7851593
      Gerrit-PatchSet: 2
      Gerrit-Owner: Liam Brady <lbr...@google.com>
      Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
      Gerrit-Reviewer: Liam Brady <lbr...@google.com>
      Gerrit-CC: Nate Chapin <jap...@chromium.org>
      Gerrit-Attention: Liam Brady <lbr...@google.com>
      Gerrit-Comment-Date: Mon, 18 May 2026 21:03:33 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Liam Brady (Gerrit)

      unread,
      May 21, 2026, 4:05:32 PMMay 21
      to Charlie Reis, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Nate Chapin, alexmo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, creis...@chromium.org, gavinp...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org, navigation...@chromium.org
      Attention needed from Charlie Reis

      Liam Brady added 12 comments

      Commit Message
      Line 18, Patchset 2:Some features will break as a result of this change and will need to be
      Charlie Reis . resolved

      Let's clarify that this CL isn't actively breaking anything-- it's just that the disabled-by-default feature introduced here can't be enabled until these features have been updated.

      Liam Brady

      Done

      Line 22, Patchset 2:`original_origin` field, which will happen once all features are working
      Charlie Reis . resolved

      Might be worth mentioning your plan to make it an Origin type after the conversion as well, since it's still a GURL for now.

      Out of curiosity, have you attempted a draft CL that changes the type (e.g., without bothering with a feature flag), just to see the extent of the changes and have a better sense that the conversion is going to work?

      (The approach in this CL has a nice small delta, but it doesn't give a lot of confidence that we've looked at the places that could be affected.)

      Liam Brady

      Done.

      From the [abandoned CL that tries to do everything at once](https://chromium-review.git.corp.google.com/c/chromium/src/+/7765993), it's primarily resource timing, observer notifications, and Android chrome-native:// navigations.

      I have 2 do-not-submit CLs up to get a sense of what will break:
      1. https://chromium-review.git.corp.google.com/c/chromium/src/+/7870029 CL to turn `original_url` into `original_origin` and see what breaks.
      2. https://chromium-review.git.corp.google.com/c/chromium/src/+/7869869?tab=checks CL to enable the 2 features introduced in this CL to see what breaks.

      File content/browser/renderer_host/navigation_controller_impl.cc
      Line 4631, Patchset 2: ? common_params->url.DeprecatedGetOriginAsURL()
      Charlie Reis . resolved

      This is generally not a safe function to call, but I think it's consistent with what Nasko was doing. Can you include a comment above this block similar to https://source.chromium.org/chromium/chromium/src/+/main:content/browser/renderer_host/navigation_request.cc;drc=dbf362a812f4e3822fac968906d87a77d07d6a84;l=7950-7953 to explain why it's ok?

      Probably the same in the other places where we call this.

      Liam Brady

      Done

      File content/browser/renderer_host/navigation_request.cc

      Should we revert these changes? It looks like the other flags are defined elsewhere now, and we're not modifying this flag or how it's used.

      Liam Brady

      Done

      Line 7787, Patchset 2: commit_params_->original_url = common_params_->url;
      Charlie Reis . resolved

      All of these places seem reasonable to me, though I'm not sure how to tell that we caught them all. (Maybe the earlier idea of a draft CL where we change the type to Origin would help with that?)

      Liam Brady

      I'll get a CL up for that.

      Line 8048, Patchset 2: url::Origin final_origin = url::Origin::Create(common_params_->url);
      Charlie Reis . resolved

      This is also potentially a bit fraught:

      1) Are we ok not handling any cases that inherit an origin, like about:blank? Maybe those will never have Location headers as part of a redirect chain?

      2) Should we be sanitizing if we cross a CSP sandbox boundary?

      It's possible we could get by with a comment like the other cases, but I'm curious if a TODO is needed.

      Liam Brady

      I've added a TODO comment to look at this as a follow-up.

      File content/browser/renderer_host/navigation_request_unittest.cc
      Line 970, Patchset 2:}
      Charlie Reis . resolved

      Can these new tests also be checking original_url?

      Liam Brady

      Done

      Line 982, Patchset 2: url::AddStandardScheme("chrome-native", url::SCHEME_WITH_HOST);
      Charlie Reis . resolved

      Does this depend on actually being chrome-native (which I didn't think had much support in content/, though it looks like some [metrics code](https://chromium-review.googlesource.com/c/chromium/src/+/6173196) knows about it), or can we make something up like chrome-foo?

      Liam Brady

      I think we can get away with `chrome-foo`. The `chrome-native` stuff that this bug fix needs to be careful around is tested elsewhere so I think this should be fine.

      Line 1091, Patchset 2: /*disabled_features=*/{});
      Charlie Reis . resolved

      Should this test verify anything about Location headers or original_url? Otherwise I'm not sure why these features need to be enabled.

      Liam Brady

      I'll keep just `kSanitizeOriginalUrlDuringNavigation` enabled and check the `original_url` value.

      File content/common/features.cc
      Line 672, Patchset 2:// to only include the origin when cross-origin to the final URL.
      Charlie Reis . resolved

      Let's include the bug number here and below.

      Liam Brady

      Done

      File content/renderer/render_frame_impl.cc
      Line 496, Patchset 2: // original URL).
      Charlie Reis . resolved

      I wonder if we can clarify this at all. I think the second sentence is correct and that we always have the full final URL in non-redirecting cases. Is the first sentence wrong if the feature is enabled, since we're using just an original origin in that case?

      Liam Brady

      For correctness, I've updated this comment to mention redirect sanitization as a possibility.

      File third_party/blink/renderer/platform/loader/fetch/url_loader/navigation_body_loader.cc
      Line 626, Patchset 2: // the same as the original URL).
      Charlie Reis . resolved

      Same here.

      Liam Brady

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Charlie Reis
      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: I87a086725cf8b3acbdfea94cacbbb72e56033f23
        Gerrit-Change-Number: 7851593
        Gerrit-PatchSet: 4
        Gerrit-Owner: Liam Brady <lbr...@google.com>
        Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
        Gerrit-Reviewer: Liam Brady <lbr...@google.com>
        Gerrit-CC: Nate Chapin <jap...@chromium.org>
        Gerrit-Attention: Charlie Reis <cr...@chromium.org>
        Gerrit-Comment-Date: Thu, 21 May 2026 20:05:23 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Charlie Reis <cr...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Charlie Reis (Gerrit)

        unread,
        May 21, 2026, 9:27:19 PMMay 21
        to Liam Brady, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Nate Chapin, alexmo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, creis...@chromium.org, gavinp...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org, navigation...@chromium.org
        Attention needed from Liam Brady

        Charlie Reis voted and added 5 comments

        Votes added by Charlie Reis

        Code-Review+1

        5 comments

        Patchset-level comments
        File-level comment, Patchset 4 (Latest):
        Charlie Reis . resolved

        LGTM!

        Commit Message
        Line 7, Patchset 4 (Latest):Sanitize more commit params for cross-origin redirects.
        Charlie Reis . unresolved

        nit: Just to make it clearer from the CL summary, maybe prefix this with something like "[Disabled] " so that it doesn't look like we've fixed the bug when this lands?

        Line 22, Patchset 2:`original_origin` field, which will happen once all features are working
        Charlie Reis . resolved

        Might be worth mentioning your plan to make it an Origin type after the conversion as well, since it's still a GURL for now.

        Out of curiosity, have you attempted a draft CL that changes the type (e.g., without bothering with a feature flag), just to see the extent of the changes and have a better sense that the conversion is going to work?

        (The approach in this CL has a nice small delta, but it doesn't give a lot of confidence that we've looked at the places that could be affected.)

        Liam Brady

        Done.

        From the [abandoned CL that tries to do everything at once](https://chromium-review.git.corp.google.com/c/chromium/src/+/7765993), it's primarily resource timing, observer notifications, and Android chrome-native:// navigations.

        I have 2 do-not-submit CLs up to get a sense of what will break:
        1. https://chromium-review.git.corp.google.com/c/chromium/src/+/7870029 CL to turn `original_url` into `original_origin` and see what breaks.
        2. https://chromium-review.git.corp.google.com/c/chromium/src/+/7869869?tab=checks CL to enable the 2 features introduced in this CL to see what breaks.

        Charlie Reis

        Fantastic, thanks! That CL was really useful to step through alongside this one to make sure we see all the implications, and I found only one case in this CL that we missed.

        File content/browser/renderer_host/navigation_controller_impl.cc
        Line 4850, Patchset 4 (Latest): *frame_entry, common_params->url, common_params->method,
        File content/renderer/render_frame_impl.cc
        Line 496, Patchset 2: // original URL).
        Charlie Reis . resolved

        I wonder if we can clarify this at all. I think the second sentence is correct and that we always have the full final URL in non-redirecting cases. Is the first sentence wrong if the feature is enabled, since we're using just an original origin in that case?

        Liam Brady

        For correctness, I've updated this comment to mention redirect sanitization as a possibility.

        Charlie Reis

        Looks good, thanks.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Liam Brady
        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: I87a086725cf8b3acbdfea94cacbbb72e56033f23
          Gerrit-Change-Number: 7851593
          Gerrit-PatchSet: 4
          Gerrit-Owner: Liam Brady <lbr...@google.com>
          Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
          Gerrit-Reviewer: Liam Brady <lbr...@google.com>
          Gerrit-CC: Nate Chapin <jap...@chromium.org>
          Gerrit-Attention: Liam Brady <lbr...@google.com>
          Gerrit-Comment-Date: Fri, 22 May 2026 01:27:09 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          Comment-In-Reply-To: Liam Brady <lbr...@google.com>
          Comment-In-Reply-To: Charlie Reis <cr...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Liam Brady (Gerrit)

          unread,
          May 22, 2026, 7:47:29 PMMay 22
          to Daniel Cheng, Charlie Reis, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Nate Chapin, alexmo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, creis...@chromium.org, gavinp...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org, navigation...@chromium.org
          Attention needed from Daniel Cheng

          Liam Brady added 3 comments

          Patchset-level comments
          File-level comment, Patchset 6 (Latest):
          Liam Brady . resolved

          dcheng@: PTAL at:

          • navigation_body_loader.cc
          • navigation_params.mojom

          Thanks!

          Commit Message
          Line 7, Patchset 4:Sanitize more commit params for cross-origin redirects.
          Charlie Reis . resolved

          nit: Just to make it clearer from the CL summary, maybe prefix this with something like "[Disabled] " so that it doesn't look like we've fixed the bug when this lands?

          Liam Brady

          Done

          File content/browser/renderer_host/navigation_controller_impl.cc
          Line 4850, Patchset 4: *frame_entry, common_params->url, common_params->method,
          Charlie Reis . resolved
          Liam Brady

          Oh good catch. I've updated this as well.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Daniel Cheng
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not satisfiedCode-Owners
            • requirement satisfiedCode-Review
            • 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: I87a086725cf8b3acbdfea94cacbbb72e56033f23
            Gerrit-Change-Number: 7851593
            Gerrit-PatchSet: 6
            Gerrit-Owner: Liam Brady <lbr...@google.com>
            Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
            Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
            Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
            Gerrit-Comment-Date: Fri, 22 May 2026 23:47:17 +0000
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Daniel Cheng (Gerrit)

            unread,
            May 23, 2026, 2:32:54 PMMay 23
            to Liam Brady, Daniel Cheng, Charlie Reis, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Nate Chapin, alexmo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, creis...@chromium.org, gavinp...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org, navigation...@chromium.org
            Attention needed from Liam Brady

            Daniel Cheng voted and added 1 comment

            Votes added by Daniel Cheng

            Code-Review+1

            1 comment

            File third_party/blink/renderer/platform/loader/fetch/url_loader/navigation_body_loader.cc
            Line 623, Patchset 6 (Latest): // Use the original navigation URL (or its sanitized origin, if redirect
            Daniel Cheng . unresolved

            At least here, it's not entirely clear where the origin woudl come from; the next few lines only reference "original_url". Maybe the comment could give a bit more context?

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Liam Brady
            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: I87a086725cf8b3acbdfea94cacbbb72e56033f23
            Gerrit-Change-Number: 7851593
            Gerrit-PatchSet: 6
            Gerrit-Owner: Liam Brady <lbr...@google.com>
            Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
            Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
            Gerrit-Reviewer: Liam Brady <lbr...@google.com>
            Gerrit-CC: Nate Chapin <jap...@chromium.org>
            Gerrit-Attention: Liam Brady <lbr...@google.com>
            Gerrit-Comment-Date: Sat, 23 May 2026 18:32:41 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Liam Brady (Gerrit)

            unread,
            May 26, 2026, 5:21:13 PMMay 26
            to Daniel Cheng, Charlie Reis, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Nate Chapin, alexmo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, creis...@chromium.org, gavinp...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org, navigation...@chromium.org

            Liam Brady voted Commit-Queue+2

            Commit-Queue+2
            Open in Gerrit

            Related details

            Attention set is empty
            Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement satisfiedCode-Owners
              • requirement satisfiedCode-Review
              • 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: I87a086725cf8b3acbdfea94cacbbb72e56033f23
              Gerrit-Change-Number: 7851593
              Gerrit-PatchSet: 7
              Gerrit-Owner: Liam Brady <lbr...@google.com>
              Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
              Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
              Gerrit-Reviewer: Liam Brady <lbr...@google.com>
              Gerrit-CC: Nate Chapin <jap...@chromium.org>
              Gerrit-Comment-Date: Tue, 26 May 2026 21:20:51 +0000
              Gerrit-HasComments: No
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              open
              diffy

              Liam Brady (Gerrit)

              unread,
              May 26, 2026, 5:22:23 PMMay 26
              to Daniel Cheng, Charlie Reis, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Nate Chapin, alexmo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, creis...@chromium.org, gavinp...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org, navigation...@chromium.org

              Liam Brady added 1 comment

              File third_party/blink/renderer/platform/loader/fetch/url_loader/navigation_body_loader.cc
              Line 623, Patchset 6: // Use the original navigation URL (or its sanitized origin, if redirect
              Daniel Cheng . resolved

              At least here, it's not entirely clear where the origin woudl come from; the next few lines only reference "original_url". Maybe the comment could give a bit more context?

              Liam Brady

              I've expanded on the comment to be clear that `commit_params->original_url` is sanitized by the time it reaches this point.

              Gerrit-Comment-Date: Tue, 26 May 2026 21:20:14 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              Comment-In-Reply-To: Daniel Cheng <dch...@chromium.org>
              satisfied_requirement
              open
              diffy

              Chromium LUCI CQ (Gerrit)

              unread,
              May 26, 2026, 6:27:34 PMMay 26
              to Liam Brady, Daniel Cheng, Charlie Reis, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Nate Chapin, alexmo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, creis...@chromium.org, gavinp...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org, navigation...@chromium.org

              Chromium LUCI CQ submitted the change with unreviewed changes

              Unreviewed changes

              6 is the latest approved patch-set.
              The change was submitted with unreviewed changes in the following files:

              ```
              The name of the file: content/renderer/render_frame_impl.cc
              Insertions: 8, Deletions: 5.

              @@ -490,11 +490,14 @@
              const blink::mojom::CommonNavigationParams& common_params,
              const blink::mojom::CommitNavigationParams& commit_params,
              blink::WebNavigationParams* navigation_params) {
              - // Use the original navigation URL (or its sanitized origin, if redirect
              - // sanitization is enabled) to start with. We'll replay the redirects
              - // afterwards and will eventually arrive at the final URL. For non-redirecting
              - // navigations, use the final URL to be committed (as that is the same as the
              - // original URL).
              + // Use the original navigation URL to start with. Note that when the browser
              + // enables redirect sanitization (via
              + // `features::kSanitizeOriginalUrlDuringNavigation`), it populates
              + // `commit_params->original_url` with only the sanitized origin of the
              + // original URL instead of the full URL by calling DeprecatedGetOriginAsURL().
              + // We'll replay the redirects afterwards and will eventually arrive at the
              + // final URL. For non-redirecting navigations, use the final URL to be
              + // committed (as that is the same as the original URL).
              const bool should_use_original_url = !commit_params.redirect_infos.empty() &&
              !commit_params.original_url.is_empty();
              navigation_params->url =
              ```
              ```
              The name of the file: third_party/blink/renderer/platform/loader/fetch/url_loader/navigation_body_loader.cc
              Insertions: 8, Deletions: 5.

              @@ -620,11 +620,14 @@
              bool is_main_frame,
              WebNavigationParams* navigation_params,
              bool is_ad_frame) {
              - // Use the original navigation URL (or its sanitized origin, if redirect
              - // sanitization is enabled) to start with. We'll replay the redirects
              - // afterwards and will eventually arrive at the final URL. For non-redirecting
              - // navigations, use the final URL to be committed (as that is the same as the
              - // original URL).
              + // Use the original navigation URL to start with. Note that when the browser
              + // enables redirect sanitization (via
              + // `features::kSanitizeOriginalUrlDuringNavigation`), it populates
              + // `commit_params->original_url` with only the sanitized origin of the
              + // original URL instead of the full URL by calling DeprecatedGetOriginAsURL().
              + // We'll replay the redirects afterwards and will eventually arrive at the
              + // final URL. For non-redirecting navigations, use the final URL to be
              + // committed (as that is the same as the original URL).
              const bool should_use_original_url = !commit_params->redirect_infos.empty() &&
              !commit_params->original_url.is_empty();
              const KURL original_url = should_use_original_url
              ```

              Change information

              Commit message:
              [Disabled] Sanitize more commit params for cross-origin redirects.

              The `NavigationRequest::SanitizeRedirectsForCommit` method was
              introduced to prevent sensitive cross-site URL information (such as
              query parameters) from making it to a committed navigation's renderer if
              the navigation was the result of a redirect or redirect chain. This
              method sanitized the commit params' `redirects` and `redirect_infos`
              fields. However, it did not account for information being in either the
              `original_url` field or in "Location" headers in `redirect_response`.

              This CL sanitizes those fields.

              This CL is behind two new default-disabled feature flags, so this will
              essentially be a no-op. This is done because we expect some features to
              break with the feature enabled. They will need to be modified to work
              with these changes. That will be done in follow-up CLs. Landing this CL
              will not actively break anything since the features will be turned off.

              The end goal is to fully replace `original_url` with an Origin type

              `original_origin` field, which will happen once all features are working
              as expected with this change.
              Bug: 495463654
              Change-Id: I87a086725cf8b3acbdfea94cacbbb72e56033f23
              Reviewed-by: Charlie Reis <cr...@chromium.org>
              Commit-Queue: Liam Brady <lbr...@google.com>
              Reviewed-by: Daniel Cheng <dch...@chromium.org>
              Cr-Commit-Position: refs/heads/main@{#1636524}
              Files:
              • M content/browser/renderer_host/navigation_controller_impl.cc
              • M content/browser/renderer_host/navigation_entry_impl.cc
              • M content/browser/renderer_host/navigation_request.cc
              • M content/browser/renderer_host/navigation_request.h
              • M content/browser/renderer_host/navigation_request_unittest.cc
              • M content/common/features.cc
              • M content/common/features.h
              • M content/renderer/render_frame_impl.cc
              • M third_party/blink/public/mojom/navigation/navigation_params.mojom
              • M third_party/blink/renderer/platform/loader/fetch/url_loader/navigation_body_loader.cc
              Change size: L
              Delta: 10 files changed, 379 insertions(+), 23 deletions(-)
              Branch: refs/heads/main
              Submit Requirements:
              • requirement satisfiedCode-Review: +1 by Charlie Reis, +1 by Daniel Cheng
              Open in Gerrit
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: merged
              Gerrit-Project: chromium/src
              Gerrit-Branch: main
              Gerrit-Change-Id: I87a086725cf8b3acbdfea94cacbbb72e56033f23
              Gerrit-Change-Number: 7851593
              Gerrit-PatchSet: 8
              Gerrit-Owner: Liam Brady <lbr...@google.com>
              Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
              Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
              Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
              Gerrit-Reviewer: Liam Brady <lbr...@google.com>
              open
              diffy
              satisfied_requirement

              Liam Brady (Gerrit)

              unread,
              Jun 4, 2026, 4:22:13 PMJun 4
              to Daniel Cheng, Zijie He, Alex Moshchuk, Charlie Reis, Nate Chapin, Chromium LUCI CQ, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, bmcquad...@chromium.org, net-r...@chromium.org, fuchsia...@chromium.org, loading-rev...@chromium.org, halliwe...@chromium.org, csharris...@chromium.org, vasilii+watchlis...@chromium.org, speed-metrics...@chromium.org, gcasto+w...@chromium.org, core-timi...@chromium.org, speed-metr...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, kinuko...@chromium.org, gavinp...@chromium.org, blink-rev...@chromium.org, blink-revi...@chromium.org, loading...@chromium.org, blink-...@chromium.org, loading-re...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, navigation...@chromium.org

              Liam Brady added 14 comments

              Patchset-level comments
              File-level comment, Patchset 15 (Latest):
              Liam Brady . resolved

              posting draft comments just to make this not be on the top of my gerrit dashboard anymore

              Commit Message
              Line 16, Patchset 13:This CL sanitizes those fields.
              Charlie Reis . resolved

              I think it's worth a step back here. Many of the changes below seem like they could introduce races, edge cases, or other bugs, and it's not obvious what invariant change we're aiming for.

              From skimming the bug and CL, it sounds like we pass full URLs (in location headers and original URL params) from browser to renderer and back again, today. IIUC, it seems like the goal is to only send origins to the renderer, and the approach to keep things working is to preserve the full URLs on the browser side for when they are needed later in the navigation. Is that right?

              If so, I'm wondering if we can be more explicit about what we are sending to the renderer going forward. Can we make it clear it's an origin and not a full URL, rather than silently converting between the two types of values, to avoid confusion of what's in the param?

              (For that matter, does the renderer actually need the origin, or could the whole thing just be a placeholder/token or even be removed entirely from commit params if the real value is only needed back in the browser process?)

              Liam Brady

              My current plan is to turn original_url in the commit params into original_origin. That way, we're explicit about sanitizing this value *unconditionally* for anything passed to the renderer. I'll work through features that break as the CQ finds them.

              File content/browser/renderer_host/navigation_request.cc
              Line 1231, Patchset 13:// Helper to get the origin of a URL for sanitization purposes.
              Charlie Reis . resolved
              We should probably make these helpers more clearly about redirect sanitization, since sanitization is ambiguous and sounds like it might need to be used in more places.

              This collection of helpers might also be good to move somewhere more specific to IPC security than NavigationRequest, though I'm not sure. We do have ipc_utils.cc for somewhat similar verification code, as one possibiliy.
              Liam Brady

              These helper functions are no longer needed and are being removed, so I'll resolve this comment.

              Line 1234, Patchset 13:// DeprecatedGetOriginAsURL() returns an empty URL for non-standard schemes.
              Charlie Reis . resolved

              Is there a way to give an example? At first glance it's hard to know why this is needed and whether it's sufficient.

              Liam Brady

              These helper functions are no longer needed and are being removed, so I'll resolve this comment. But for documentation, this was running into issues with `chrome-native://` URLs on Android failing `IsSameOriginWith()` checks even if they are same origin, since they are marked especially as always being cross-origin.

              Line 1537, Patchset 13: /*navigation_id=*/0);
              Charlie Reis . resolved

              I'm nervous about this. :) It seems hard to reason about having to pass this parameter around when many places don't assign it.

              Liam Brady

              With our new solution of grabbing the original URL/name from the `fallback_timing_info_` in the `HTMLFrameOwnerElement`, there's no need to track any navigation ID or token, so this can be removed.

              Line 1947, Patchset 13: ->SetNavigationIdForChild(
              Charlie Reis . resolved

              I'd really like to avoid storing this as state in the renderer if possible. That creates chances for the state to get out of sync or be stale (or lied about), on top of all the plumbing it requires. Let's chat about possible approaches to see if we can avoid it.

              Liam Brady

              Because of the new solution of getting the information directly from the embedder's HTMLFrameOwnerElement, this is no longer needed.

              Line 6652, Patchset 13: GetRenderFrameHost()->set_navigation_original_url(
              Charlie Reis . resolved

              This doesn't really fit with the comment above. Should it move into the helper function, if all the callers have to do it? (That's assuming we keep the value, which I'm separately wondering about.)

              Liam Brady

              Resolving as this part is being removed because of the new renderer-specific solution.

              Line 8074, Patchset 13: if (!AreSameOriginForSanitization(commit_params->original_url,
              Charlie Reis . resolved

              I'm curious: Nasko's previous code cropped everything down to an origin, without a same-origin check. Should we be consistent across the cases?

              Liam Brady

              That would be simpler. We'd get no security benefit for the same origin case, but this becomes easier to reason about.

              Line 8091, Patchset 13: const GURL& next_url = commit_params->redirects[i + 1];
              Charlie Reis . resolved

              I'm not sure I follow the `i+1` part at first glance, so it might be worth having comments about why it's needed.

              Liam Brady

              The original intention of this was to do a sanitization if there was some cross-origin hop. But I'm realizing that we really only want to sanitize if it's cross-origin to the final URL that will be committed in the renderer process, so all of this `i+1` complexity is unnecessary and functionally not what we want. I've rewritten this to sanitize the `Location` header iff it's cross-origin to the final origin to be committed.

              File content/browser/renderer_host/render_frame_host_impl.h
              Line 5154, Patchset 13: GURL navigation_original_url_;
              Charlie Reis . resolved

              It's generally not great to store navigation state on RFH-- that's what NavigationRequest is for. Is it actually needed after the navigation completes, and how does that work today?

              Also, is it actually test-specific, or do real observers depend on the value? If it's only for tests, maybe we can find a fix in the test framework that doesn't require new state on RFH.

              Liam Brady

              Resolving as this has been removed with the latest iteration.

              File third_party/blink/renderer/core/html/html_frame_owner_element.h
              Line 272, Patchset 13: KURL pending_navigation_url_;
              Charlie Reis . resolved

              I'm also concerned about storing the pending navigation URL (along with the previous comment about the ID), since these both seem easy to get wrong or use incorrectly.

              Liam Brady

              Resolving as we already have the original navigation URL stored in the `fallback_timing_info_`'s `name`.

              Line 272, Patchset 13: KURL pending_navigation_url_;
              Charlie Reis . resolved

              I'm also concerned about storing the pending navigation URL (along with the previous comment about the ID), since these both seem easy to get wrong or use incorrectly.

              Liam Brady

              With the new approach, this is no longer needed, so I'll remove this.

              File third_party/blink/renderer/core/html/html_frame_owner_element.cc
              Line 558, Patchset 13: // TODO(crbug.com/1410705): fix this properly by moving IFrame reporting to
              Charlie Reis . resolved

              Interesting-- is the code below still needed at all? The bug in this TODO is marked fixed, so I'm curious if we can remove it instead of adding the state.

              Liam Brady

              So the [CL that closed out the bug](https://chromium-review.git.corp.google.com/c/chromium/src/+/4299070) isn't fully moving the reporting to the browser. Let me check with nrosenthal@ to see if this is still needed.

              Update: He thinks this is still needed. The linked bug ended up simply consolidating reporting on the renderer side, and I guess the race is still possible.

              Second update: He took another look and thinks this is safe to remove after all. I'm going to remove this and see if anything breaks.

              Line 582, Patchset 13: pending_navigation_url_ = KURL(fallback_timing_info_->name);
              Charlie Reis . resolved

              I'm not sure I understand how `name` and `url` are related here.

              Liam Brady

              This block is going away with our new design, but for documentation, the timing info's `name` is essentially the "key" that's used to associate info. That name is really just the [original URL for the navigation](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceNavigationTiming#:~:text=Returns%20the%20document%27s%20URL).

              Open in Gerrit

              Related details

              Attention set is empty
              Submit Requirements:
              • requirement satisfiedCode-Coverage
              • 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: I3ef9284d5b90f6b451a5a117d3a2c97168ee6129
              Gerrit-Change-Number: 7765993
              Gerrit-PatchSet: 15
              Gerrit-Owner: Liam Brady <lbr...@google.com>
              Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
              Gerrit-Reviewer: Liam Brady <lbr...@google.com>
              Gerrit-CC: Alex Moshchuk <ale...@chromium.org>
              Gerrit-CC: Daniel Cheng <dch...@chromium.org>
              Gerrit-CC: Nasko Oskov <na...@chromium.org>
              Gerrit-CC: Nate Chapin <jap...@chromium.org>
              Gerrit-CC: Zijie He <zij...@google.com>
              Gerrit-Comment-Date: Thu, 04 Jun 2026 20:21:50 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              Comment-In-Reply-To: Charlie Reis <cr...@chromium.org>
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Arthur Sonzogni (Gerrit)

              unread,
              Jun 15, 2026, 5:47:21 AMJun 15
              to Chromium LUCI CQ, Liam Brady, Daniel Cheng, Charlie Reis, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Nate Chapin, alexmo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, creis...@chromium.org, gavinp...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org, navigation...@chromium.org
              Attention needed from Liam Brady

              Arthur Sonzogni added 1 comment

              File content/browser/renderer_host/navigation_request.cc
              Line 1810, Patchset 8 (Latest): if (base::FeatureList::IsEnabled(
              features::kSanitizeOriginalUrlDuringNavigation)) {
              CHECK_EQ(common_params_->url.DeprecatedGetOriginAsURL(),
              commit_params_->original_url);
              } else {
              CHECK_EQ(common_params_->url, commit_params_->original_url);
              }
              Arthur Sonzogni . unresolved

              Note: @cr...@chromium.org and @lbr...@google.com

              I have to revert the CHECK back to a DCHECK, but this conflict with this change that split it in two. I resolved assuming both are failing.

              See:
              https://crbug.com/523555340

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Liam Brady
              Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement satisfiedCode-Owners
              • requirement satisfiedCode-Review
              • 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: I87a086725cf8b3acbdfea94cacbbb72e56033f23
              Gerrit-Change-Number: 7851593
              Gerrit-PatchSet: 8
              Gerrit-Owner: Liam Brady <lbr...@google.com>
              Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
              Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
              Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
              Gerrit-Reviewer: Liam Brady <lbr...@google.com>
              Gerrit-CC: Arthur Sonzogni <arthurs...@google.com>
              Gerrit-CC: Nate Chapin <jap...@chromium.org>
              Gerrit-Comment-Date: Mon, 15 Jun 2026 09:47:01 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              satisfied_requirement
              open
              diffy

              Liam Brady (Gerrit)

              unread,
              Jun 18, 2026, 2:09:45 PM (11 days ago) Jun 18
              to Chromium LUCI CQ, Daniel Cheng, Charlie Reis, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Nate Chapin, alexmo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, creis...@chromium.org, gavinp...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, loading...@chromium.org, navigation...@chromium.org

              Liam Brady added 1 comment

              File content/browser/renderer_host/navigation_request.cc
              Line 1810, Patchset 8 (Latest): if (base::FeatureList::IsEnabled(
              features::kSanitizeOriginalUrlDuringNavigation)) {
              CHECK_EQ(common_params_->url.DeprecatedGetOriginAsURL(),
              commit_params_->original_url);
              } else {
              CHECK_EQ(common_params_->url, commit_params_->original_url);
              }
              Name of user not set #1174429 . resolved

              Note: @cr...@chromium.org and @lbr...@google.com

              I have to revert the CHECK back to a DCHECK, but this conflict with this change that split it in two. I resolved assuming both are failing.

              See:
              https://crbug.com/523555340

              Liam Brady

              Acknowledged

              Open in Gerrit

              Related details

              Attention set is empty
              Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement satisfiedCode-Owners
              • requirement satisfiedCode-Review
              • 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: I87a086725cf8b3acbdfea94cacbbb72e56033f23
              Gerrit-Change-Number: 7851593
              Gerrit-PatchSet: 8
              Gerrit-Owner: Liam Brady <lbr...@google.com>
              Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
              Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
              Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
              Gerrit-Reviewer: Liam Brady <lbr...@google.com>
              Gerrit-CC: Name of user not set #1174429
              Gerrit-Comment-Date: Thu, 18 Jun 2026 18:09:23 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              Comment-In-Reply-To: Name of user not set #1174429
              satisfied_requirement
              open
              diffy
              Reply all
              Reply to author
              Forward
              0 new messages