Skip to content

Commit

Permalink
Modify referrer algorithm to use referrerpolicy attribute if present
Browse files Browse the repository at this point in the history
  • Loading branch information
estark37 committed Nov 19, 2015
1 parent 77be4ed commit 6a92457
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
16 changes: 6 additions & 10 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@ <h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="cont
<dt>Feedback:
<dd><span><a href="mailto:public-webappsec@w3.org?subject=%5BREFERRER%5D%20YOUR%20TOPIC%20HERE">public-webappsec@w3.org</a> with subject line “<kbd>[REFERRER] <i data-lt="">… message topic …</i></kbd>” (<a href="http://lists.w3.org/Archives/Public/public-webappsec/" rel="discussion">archives</a>)</span>
<dt>Issue Tracking:
<dd><a href="https://github.com/jeisinger/webappsec-referrer-policy/issues/">GitHub</a>
<dd><a href="https://github.com/estark37/webappsec-referrer-policy/issues/">GitHub</a>
<dt class="editor">Editors:
<dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:eisinger@google.com">Jochen Eisinger</a> (<span class="p-org org">Google Inc.</span>)
<dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:estark@google.com">Emily Stark</a> (<span class="p-org org">Google Inc.</span>)
Expand Down Expand Up @@ -1150,7 +1150,6 @@ <h2 class="no-num no-toc no-ref heading settled" id="contents"><span class="cont
<li><a href="#informative"><span class="secno"></span> <span class="content">Informative References</span></a>
</ul>
<li><a href="#idl-index"><span class="secno"></span> <span class="content">IDL Index</span></a>
<li><a href="#issues-index"><span class="secno"></span> <span class="content">Issues Index</span></a>
</ul>
</div>
<main>
Expand Down Expand Up @@ -1449,11 +1448,13 @@ <h3 class="heading settled" data-level="7.2" id="determine-requests-referrer"><s
either <code>no referrer</code> or a URL:</p>
<p class="note" role="note">Note: If Fetch is performing a navigation in response to a link of type <code><a data-link-type="dfn" href="http://www.w3.org/TR/html5/links.html#link-type-noreferrer">noreferrer</a></code>, then <var>request</var>’s <code>referrer</code> will be <code>no referrer</code>, and Fetch won’t call
into this algorithm.</p>
<p class="issue" id="issue-2cf94c0c"><a class="self-link" href="#issue-2cf94c0c"></a> This algorithm needs to be modifed to take into account any local
overrides via the referrer attribute on elements.</p>
<ol>
<li> Let <var>environment</var> be <var>request</var>’s <code>client</code>.
<li> Let <var>policy</var> be the value of <var>environment</var>’s <a data-link-type="dfn" href="#referrer-policy">referrer policy</a>.
<li> If <var>request</var> was initiated by an element with
a <code>referrerpolicy</code> attribute, let <var>policy</var> be
the result of executing <a href="#determine-policy-for-token">§7.4 Determine token’s Policy</a> on the
value of the element’s <code>referrerpolicy</code> attribute. Otherwise, let <var>policy</var> be the value
of <var>environment</var>’s <a data-link-type="dfn" href="#referrer-policy">referrer policy</a>.
<li>
If <var>request</var>’s <code>referrer</code> is a URL, then let <var>referrerSource</var> be <var>request</var>’s <code>referrer</code>. Otherwise:
<ol>
Expand Down Expand Up @@ -1774,10 +1775,5 @@ <h2 class="no-num heading settled" id="idl-index"><span class="content">IDL Inde
};

</pre>
<h2 class="no-num heading settled" id="issues-index"><span class="content">Issues Index</span><a class="self-link" href="#issues-index"></a></h2>
<div style="counter-reset:issue">
<div class="issue"> This algorithm needs to be modifed to take into account any local
overrides via the referrer attribute on elements.<a href="#issue-2cf94c0c"></a></div>
</div>
</body>
</html>
11 changes: 6 additions & 5 deletions index.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -713,16 +713,17 @@ <h3 id="determine-requests-referrer">
<code>referrer</code> will be <code>no referrer</code>, and Fetch won't call
into this algorithm.

ISSUE: This algorithm needs to be modifed to take into account any local
overrides via the referrer attribute on elements.

<ol>
<li>
Let <var>environment</var> be <var>request</var>'s <code>client</code>.
</li>
<li>
Let <var>policy</var> be the value of <var>environment</var>'s
<a>referrer policy</a>.
If <var>request</var> was initiated by an element with
a <code>referrerpolicy</code> attribute, let <var>policy</var> be
the result of executing [[#determine-policy-for-token]] on the
value of the element's <code>referrerpolicy</code>
attribute. Otherwise, let <var>policy</var> be the value
of <var>environment</var>'s <a>referrer policy</a>.
</li>
<li>
If <var>request</var>'s <code>referrer</code> is a URL, then let
Expand Down

0 comments on commit 6a92457

Please sign in to comment.