Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bvandersloot-mozilla
Copy link

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.

  • At least two implementers are interested (and none opposed):
  • Tests are written and can be reviewed and commented upon at:
    • change is not observable, not needed?
  • Implementation bugs are filed:
    • change is to update spec interfacing, not needed?
  • Corresponding HTML AAM & ARIA in HTML issues & PRs:
  • MDN issue is filed:
    • I don't think this is needed?
  • The top of this comment includes a clear commit message to use.

(See WHATWG Working Mode: Changes for more details.)

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.
Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -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>
Copy link
Member

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>
Copy link
Member

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.

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.

Copy link
Member

@annevk annevk left a 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>
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants