-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spec descendant frames' ongoing navigations block disableUntrustedNetwork promise from being resolved #210
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
+@domfarolino for review, thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty much lgtm. This covers traversals as well btw, which I think is the goal too? Does that match the implementation? And are there WPTs?
@@ -2099,7 +2110,8 @@ Several APIs specific to fenced frames are defined on the {{Fence}} interface. | |||
|
|||
1. [=map/Clear=] |config|'s [=fenced frame config instance/on network disabled promises=]. | |||
|
|||
1. Otherwise: | |||
1. If |networkCutoffReady| is false or |ongoingNavigation| is not null: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. If |networkCutoffReady| is false or |ongoingNavigation| is not null: | |
1. If |ongoingNavigation| is not null: |
Isn't this the same, since at this point we already know that |networkCuttoffReady|
is false?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The above if branch does not early return. Also the line Otherwise:
is removed. So at this point |networkCuttoffReady|
can be true or false here.
Even if we add the early return above, the condition |networkCutoffReady| is false
is still needed. As the suggested edit, IIUC when |networkCutoffReady|
is false but |ongoingNavigation|
is null, the branch will not be entered, however it should.
Thanks!
From what I read from the spec, when This is the race condition that the PR targets: When a parent frame tries to disable untrusted networks, it checks the child frame and finds it has untrusted network disabled. Without checking descendant frames' ongoing navigations, the parent frame goes ahead marking its untrusted network also disabled. But if the child frame has an ongoing navigation, including the history traversal, it resets the child frame's untrusted network to enabled as the frame navigates to a different page. The implementation checks this via FrameTreeNode::HasNavigation(), which is set during normal navigation as well as history traversal. So the spec matches the implementation.
No. I'm adding WPTs for this. Tracking in bug: crbug/397377177. |
fix: #205
This PR only implements the change in algorithm "recalculate the untrusted network status of all fenced frame descendants".
The part that this algorithm should be called whenever a navigation commits will be done in a follow-up PR. I'm still investigating how to spec this. See previous comment on this.
Preview | Diff