Re: [whatwg/url] Tighten 'same site' checks to include 'scheme'. (#449)

annevk commented on this pull request.



> +
+<p>Two <a for=/>hosts</a>, <var>A</var> and <var>B</var> are said to be
+<dfn for=host export>schemelessly same site</dfn> with each other if either of the following statements are true:
+
+<ul class=brief>
+ <li><p><var>A</var> <a for=host>equals</a> <var>B</var> and <var>A</var>'s
+ <a for=host>registrable domain</a> is non-null.
+
+ <li><p><var>A</var>'s <a for=host>registrable domain</a> is <var>B</var>'s
+ <a for=host>registrable domain</a> and is non-null.
+</ul>
+
+<p>Two <a for=/>URL</a>s, <var>A</var> and <var>B</var> are said to be
+<dfn for=url>schemelessly same site</dfn> with each other if <var>A</var>'s
+<a for=url>host</a> is <a for=host>schemelessly same site</a> with <var>B</var>'s
+<a for=url>host</a>.

A URL's host can be null. So probably needs to be about as complicated (or you need to assert a certain scheme).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/pull/449#pullrequestreview-288046252

Received on Friday, 13 September 2019 14:21:04 UTC