[html5] r7842 - [e] (0) Make this a bit clearer. Fixing https://www.w3.org/Bugs/Public/show_bug. [...]
whatwg at whatwg.org
whatwg at whatwg.org
Mon Apr 15 16:37:22 PDT 2013
Author: ianh
Date: 2013-04-15 16:37:21 -0700 (Mon, 15 Apr 2013)
New Revision: 7842
Modified:
complete.html
index
source
Log:
[e] (0) Make this a bit clearer.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=20922
Affected topics: Security
Modified: complete.html
===================================================================
--- complete.html 2013-04-15 23:07:43 UTC (rev 7841)
+++ complete.html 2013-04-15 23:37:21 UTC (rev 7842)
@@ -65586,12 +65586,13 @@
</dd>
</dl><div class=impl>
+<!--CLEANUP-->
<p>The <dfn id=dom-document-domain title=dom-document-domain><code>domain</code></dfn> attribute on
<code><a href=#document>Document</a></code> objects must be initialized to <a href="#the-document's-domain">the document's domain</a>, if it has
- one, and the empty string otherwise. If the value is an IPv6 address, then the square brackets
- from the <a href=#concept-url-host title=concept-url-host>host</a> component must be omitted from the attribute's
- value.</p>
+ one, and the empty string otherwise. If the value starts with a U+005B LEFT SQUARE BRACKET
+ character ([) and ends with a U+005D RIGHT SQUARE BRACKET character (]), it is an IPv6 address;
+ these square brackets must be omitted when initializing the attribute's value.</p>
<p>On getting, the attribute must return its current value, unless the <code><a href=#document>Document</a></code> has
no <a href=#browsing-context>browsing context</a>, in which case it must return the empty string.</p>
@@ -65606,8 +65607,9 @@
</li>
<li>
+<!--CLEANUP-->
- <p>If the new value is an IP address, let <var title="">new value</var> be the new value.
+ <p>If the new value is an IPv4 or IPv6 address, let <var title="">new value</var> be the new value.
Otherwise, apply the IDNA ToASCII algorithm to the new value, with both the AllowUnassigned and
UseSTD3ASCIIRules flags set, and let <var title="">new value</var> be the result of the ToASCII
algorithm.</p>
@@ -65623,8 +65625,9 @@
<p>If <var title="">new value</var> is not exactly equal to the current value of the <code title=dom-document-domain><a href=#dom-document-domain>document.domain</a></code> attribute, then run these substeps:</p>
<ol><li>
+<!--CLEANUP-->
- <p>If the current value is an IP address, throw a <code><a href=#securityerror>SecurityError</a></code> exception and
+ <p>If the current value is an IPv4 or IPv6 address, throw a <code><a href=#securityerror>SecurityError</a></code> exception and
abort these steps.</p>
</li>
@@ -65635,6 +65638,10 @@
match the end of the current value, throw a <code><a href=#securityerror>SecurityError</a></code> exception and abort
these steps.</p>
+ <p class=note>If the <var title="">new value</var> is an IPv4 or IPv6 address, it cannot
+ match the <var title="">new value</var> in this way and thus an exception will be thrown
+ here.</p>
+
<!-- this is the step that prevents us from ever setting document.domain if the >effective
script origin< isn't a scheme/host/port tuple -->
Modified: index
===================================================================
--- index 2013-04-15 23:07:43 UTC (rev 7841)
+++ index 2013-04-15 23:37:21 UTC (rev 7842)
@@ -65586,12 +65586,13 @@
</dd>
</dl><div class=impl>
+<!--CLEANUP-->
<p>The <dfn id=dom-document-domain title=dom-document-domain><code>domain</code></dfn> attribute on
<code><a href=#document>Document</a></code> objects must be initialized to <a href="#the-document's-domain">the document's domain</a>, if it has
- one, and the empty string otherwise. If the value is an IPv6 address, then the square brackets
- from the <a href=#concept-url-host title=concept-url-host>host</a> component must be omitted from the attribute's
- value.</p>
+ one, and the empty string otherwise. If the value starts with a U+005B LEFT SQUARE BRACKET
+ character ([) and ends with a U+005D RIGHT SQUARE BRACKET character (]), it is an IPv6 address;
+ these square brackets must be omitted when initializing the attribute's value.</p>
<p>On getting, the attribute must return its current value, unless the <code><a href=#document>Document</a></code> has
no <a href=#browsing-context>browsing context</a>, in which case it must return the empty string.</p>
@@ -65606,8 +65607,9 @@
</li>
<li>
+<!--CLEANUP-->
- <p>If the new value is an IP address, let <var title="">new value</var> be the new value.
+ <p>If the new value is an IPv4 or IPv6 address, let <var title="">new value</var> be the new value.
Otherwise, apply the IDNA ToASCII algorithm to the new value, with both the AllowUnassigned and
UseSTD3ASCIIRules flags set, and let <var title="">new value</var> be the result of the ToASCII
algorithm.</p>
@@ -65623,8 +65625,9 @@
<p>If <var title="">new value</var> is not exactly equal to the current value of the <code title=dom-document-domain><a href=#dom-document-domain>document.domain</a></code> attribute, then run these substeps:</p>
<ol><li>
+<!--CLEANUP-->
- <p>If the current value is an IP address, throw a <code><a href=#securityerror>SecurityError</a></code> exception and
+ <p>If the current value is an IPv4 or IPv6 address, throw a <code><a href=#securityerror>SecurityError</a></code> exception and
abort these steps.</p>
</li>
@@ -65635,6 +65638,10 @@
match the end of the current value, throw a <code><a href=#securityerror>SecurityError</a></code> exception and abort
these steps.</p>
+ <p class=note>If the <var title="">new value</var> is an IPv4 or IPv6 address, it cannot
+ match the <var title="">new value</var> in this way and thus an exception will be thrown
+ here.</p>
+
<!-- this is the step that prevents us from ever setting document.domain if the >effective
script origin< isn't a scheme/host/port tuple -->
Modified: source
===================================================================
--- source 2013-04-15 23:07:43 UTC (rev 7841)
+++ source 2013-04-15 23:37:21 UTC (rev 7842)
@@ -73355,12 +73355,13 @@
</dl>
<div class="impl">
+<!--CLEANUP-->
<p>The <dfn title="dom-document-domain"><code>domain</code></dfn> attribute on
<code>Document</code> objects must be initialized to <span>the document's domain</span>, if it has
- one, and the empty string otherwise. If the value is an IPv6 address, then the square brackets
- from the <span title="concept-url-host">host</span> component must be omitted from the attribute's
- value.</p>
+ one, and the empty string otherwise. If the value starts with a U+005B LEFT SQUARE BRACKET
+ character ([) and ends with a U+005D RIGHT SQUARE BRACKET character (]), it is an IPv6 address;
+ these square brackets must be omitted when initializing the attribute's value.</p>
<p>On getting, the attribute must return its current value, unless the <code>Document</code> has
no <span>browsing context</span>, in which case it must return the empty string.</p>
@@ -73377,8 +73378,9 @@
</li>
<li>
+<!--CLEANUP-->
- <p>If the new value is an IP address, let <var title="">new value</var> be the new value.
+ <p>If the new value is an IPv4 or IPv6 address, let <var title="">new value</var> be the new value.
Otherwise, apply the IDNA ToASCII algorithm to the new value, with both the AllowUnassigned and
UseSTD3ASCIIRules flags set, and let <var title="">new value</var> be the result of the ToASCII
algorithm.</p>
@@ -73397,8 +73399,9 @@
<ol>
<li>
+<!--CLEANUP-->
- <p>If the current value is an IP address, throw a <code>SecurityError</code> exception and
+ <p>If the current value is an IPv4 or IPv6 address, throw a <code>SecurityError</code> exception and
abort these steps.</p>
</li>
@@ -73409,6 +73412,10 @@
match the end of the current value, throw a <code>SecurityError</code> exception and abort
these steps.</p>
+ <p class="note">If the <var title="">new value</var> is an IPv4 or IPv6 address, it cannot
+ match the <var title="">new value</var> in this way and thus an exception will be thrown
+ here.</p>
+
<!-- this is the step that prevents us from ever setting document.domain if the >effective
script origin< isn't a scheme/host/port tuple -->
More information about the Commit-Watchers
mailing list