-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Pass a top-level navigation initiator origin to Fetch #10991
base: main
Are you sure you want to change the base?
Conversation
To un-logjam the cookie layering work, I've started whatwg/fetch#1807. That depends on this info to be piped into Fetch so we can actually specify in WHATWG what SameSite=Strict means. This patch plumbs that through on top-level navigatable fetches. This doesn't build because it relies upon the corresponding patch in Fetch. Let me know to land these.
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.
cc @johannhof
@@ -102636,6 +102636,11 @@ location.href = '#foo';</code></pre> | |||
<dt><span data-x="concept-request-referrer-policy">referrer policy</span></dt> | |||
<dd><var>entry</var>'s <span data-x="she-document-state">document state</span>'s <span | |||
data-x="document-state-request-referrer-policy">request referrer policy</span></dd> | |||
|
|||
<dt><span data-x="concept-request-navigation-initiator-origin">navigation initiator origin</span></dt> |
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.
If this is the new Fetch concept you'll have to introduce that definition in an earlier section that introduces all the Fetch terms HTML uses. (HTML doesn't use Bikeshed's link database unfortunately.)
<dt><span data-x="concept-request-navigation-initiator-origin">navigation initiator origin</span></dt> | ||
<dd><var>entry</var>'s <span data-x="she-document-state">document state</span>'s <span | ||
data-x="document-state-initiator-origin">initiator origin</span> if <var>navigable</var> is a <span>top-level traversable</span>, | ||
null otherwise.</dd> |
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.
Given that this is conditional, perhaps it's best conditionally set to a value as a follow-up step, leaving it as the default otherwise?
But also, this doesn't seem sufficient for A->B->A scenarios.
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.
Sure, that sounds reasonable.
This is only for the definition of SameSite=Lax, so it isn't needed for ABA, only for top-level traversables if I'm remembering right. Maybe I should rename the variable to something more descriptive, reflecting how it will be used? Alternatively, we can always set it and filter on the request's destination being a Document. I'm open to either.
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.
I think one thing we identified that's worth looking into here is what happens if OPENER opens POPUP and then attempts to navigate POPUP's EMBED using named targeting.
initiator origin</span> to <var>entry</var>'s <span data-x="she-document-state">document | ||
state</span>'s <span data-x="document-state-initiator-origin">initiator origin</span> | ||
</p> | ||
</li> |
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.
Please have a look at the formatting guidelines. This isn't quite it.
To un-logjam the cookie layering work, I've started whatwg/fetch#1807. That depends on this info to be piped into Fetch so we can actually specify in WHATWG what SameSite=Strict means.
This patch plumbs that through on top-level navigatable fetches.
This doesn't build because it relies upon the corresponding patch in Fetch. Let me know to land these.
(See WHATWG Working Mode: Changes for more details.)