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

Set same-origin data-URL flag to <img> fetch request #499

Closed
wants to merge 1 commit into from

Conversation

Ritsyy
Copy link
Contributor

@Ritsyy Ritsyy commented Jan 11, 2016

Fix #176

Set same-origin data-URL flag to "Fetch Request's" request instance, otherwise obtained response will be tainted.

--></p>
<var>image request</var>. Set <span data-x="same-origin-data-url-flag">
same-origin data-URL flag</span> on this request instance.
<!-- TODO "Interaction with the Preload Scanner" from the picture spec--></p>
Copy link
Member

Choose a reason for hiding this comment

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

You want to do this somewhere before <!--FETCH-->, similar to how the other things set on <var>request</var> are done. Also, you need to add "same-origin data-URL flag" to the list of terms from Fetch at the start of the specification.

@@ -24056,10 +24057,13 @@ interface <dfn>HTMLImageElement</dfn> : <span>HTMLElement</span> {
parent that is a <code>picture</code> element, set <var>request</var>'s <span
data-x="concept-request-initiator">initiator</span> to "<code data-x="">imageset</code>".</p>

<p>&#x231B; Set <span data-x="same-origin- data-url-flag">same-origin data-URL flag</span> to
the <span data-x ="concept-fetch">Fetch</span> <var>request</var> instance.
Copy link
Member

Choose a reason for hiding this comment

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

You can simplify this to Set <var>request</var>'s <span>... flag</span>.

@Ritsyy Ritsyy force-pushed the Bug176 branch 3 times, most recently from 37bd5b7 to 4d0c972 Compare January 15, 2016 17:42
@@ -2820,6 +2820,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<li><dfn data-noexport="" data-x="concept-request-destination" data-x-href="https://fetch.spec.whatwg.org/#concept-request-destination">destination</dfn>
<li><dfn data-noexport="" data-x="concept-request-origin" data-x-href="https://fetch.spec.whatwg.org/#concept-request-origin">origin</dfn>
<li><dfn data-noexport="" data-x-href="https://fetch.spec.whatwg.org/#omit-origin-header-flag">omit-<code>Origin</code>-header flag</dfn>
<li><dfn data-noexport="" data-x="same-origin-data-url-flag" data-x-href="https://fetch.spec.whatwg.org/#same-origin-data-url-flag">same-origin-data-url-flag</dfn>
Copy link
Member

Choose a reason for hiding this comment

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

Inside the <dfn>, it should read "same-origin data-URL flag", just like in Fetch. You probably also don't need data-x attribute, although then you'll have to reference the value inside the <dfn> through data-x below (lowercased).

@Ritsyy
Copy link
Contributor Author

Ritsyy commented Jan 19, 2016

@annevk changes done!

@@ -2820,6 +2820,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<li><dfn data-noexport="" data-x="concept-request-destination" data-x-href="https://fetch.spec.whatwg.org/#concept-request-destination">destination</dfn>
<li><dfn data-noexport="" data-x="concept-request-origin" data-x-href="https://fetch.spec.whatwg.org/#concept-request-origin">origin</dfn>
<li><dfn data-noexport="" data-x-href="https://fetch.spec.whatwg.org/#omit-origin-header-flag">omit-<code>Origin</code>-header flag</dfn>
<li><dfn data-noexport="" data-x-href="https://fetch.spec.whatwg.org/#same-origin-data-url-flag">same-origin data-Url flag</dfn>
Copy link
Member

Choose a reason for hiding this comment

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

Should be "same-origin data-URL flag" (uppercase "URL")

@annevk
Copy link
Member

annevk commented Jan 19, 2016

Committed as b09402f. Thank you!

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.

3 participants