[EME] Add origin checks to loadSession() algorithm.
authorDavid Dorwin <ddorwin@google.com>
Tue, 25 Mar 2014 14:38:44 -0700
changeset 264 65700f185389
parent 263 1c0406dd179f
child 265 cf000249bd8d
[EME] Add origin checks to loadSession() algorithm.
encrypted-media/encrypted-media.html
encrypted-media/encrypted-media.xml
--- a/encrypted-media/encrypted-media.html	Mon Mar 24 17:49:40 2014 -0700
+++ b/encrypted-media/encrypted-media.html	Tue Mar 25 14:38:44 2014 -0700
@@ -91,7 +91,7 @@
     <div class="head">
       <p><a href="http://www.w3.org/"><img src="https://www.w3.org/Icons/w3c_home" alt="W3C" width="72" height="48"></a></p>
       <h1>Encrypted Media Extensions</h1>
-      <h2 id="draft-date">W3C Editor's Draft 24 March 2014</h2>
+      <h2 id="draft-date">W3C Editor's Draft 25 March 2014</h2>
       <dl>
         <dt>This Version:</dt>
         <dd><a href="http://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html">http://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html</a></dd>
@@ -499,18 +499,20 @@
           </li>
           <li><p>Let <var title="true">request</var> be null.</p></li>
           <li><p>Let <var title="true">destination URL</var> be null.</p></li>
+          <li><p>Let <var title="true">origin</var> be the <a href="http://www.w3.org/TR/html5/browsers.html#origin-0">origin</a> of the <code><a href="#dom-mediakeys">MediaKeys</a></code> object's <code><a href="http://www.w3.org/TR/dom/#document">Document</a></code>.</p></li>
           <li><p>Let <var title="true">cdm</var> be the <var title="true">cdm</var> loaded in the <a href="#dom-mediakeys-constructor"><code>MediaKeys</code> constructor</a>.</p></li>
           <li>
 <p>Use <var title="true">cdm</var> to execute the following steps:</p>
             <ol>
               <li>
-<p>If there is no data stored for the <var title="true">sessionId</var>, run the following steps:</p>
+<p>If there is no data stored for the <var title="true">sessionId</var> in the <var title="true">origin</var>, run the following steps:</p>
                 <ol>
                   <li><p>Run the <a href="#algorithms-queue-error">Queue an "error" Event</a> algorithm on the <var title="true">session</var>, "<code><a href="http://www.w3.org/TR/dom/#notfounderror">NotFoundError</a></code>" and 0.</p></li>
                   <li><p>Abort the task.</p></li>
                 </ol>
               </li>
-              <li><p>Let <var title="true">session data</var> be the data stored for the <var title="true">sessionId</var>.</p></li>
+              <li><p>Let <var title="true">session data</var> be the data stored for the <var title="true">sessionId</var> in the <var title="true">origin</var>.
+              This must not include data from other origin(s) or that is not associated with an origin.</p></li>
               <li><p>Load the <var title="true">session data</var> and associate it with the <var title="true">session</var>.</p></li>
               <li>
 <p>If a message exchange is required:</p>
--- a/encrypted-media/encrypted-media.xml	Mon Mar 24 17:49:40 2014 -0700
+++ b/encrypted-media/encrypted-media.xml	Tue Mar 25 14:38:44 2014 -0700
@@ -90,7 +90,7 @@
     <div class="head">
       <p><a href="http://www.w3.org/"><img src="https://www.w3.org/Icons/w3c_home" alt="W3C" width="72" height="48" /></a></p>
       <h1>Encrypted Media Extensions</h1>
-      <h2 id="draft-date">W3C Editor's Draft 24 March 2014</h2>
+      <h2 id="draft-date">W3C Editor's Draft 25 March 2014</h2>
       <dl>
         <dt>This Version:</dt>
         <dd><a href="http://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html">http://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html</a></dd>
@@ -486,16 +486,18 @@
           </li>
           <li><p>Let <var title="true">request</var> be null.</p></li>
           <li><p>Let <var title="true">destination URL</var> be null.</p></li>
+          <li><p>Let <var title="true">origin</var> be the <a href="http://www.w3.org/TR/html5/browsers.html#origin-0">origin</a> of the <coderef>MediaKeys</coderef> object's <code><dom4ref name="document">Document</dom4ref></code>.</p></li>
           <li><p>Let <var title="true">cdm</var> be the <var title="true">cdm</var> loaded in the <a href="#dom-mediakeys-constructor"><code>MediaKeys</code> constructor</a>.</p></li>
           <li><p>Use <var title="true">cdm</var> to execute the following steps:</p>
             <ol>
-              <li><p>If there is no data stored for the <var title="true">sessionId</var>, run the following steps:</p>
+              <li><p>If there is no data stored for the <var title="true">sessionId</var> in the <var title="true">origin</var>, run the following steps:</p>
                 <ol>
                   <li><p>Run the <a href="#algorithms-queue-error">Queue an "error" Event</a> algorithm on the <var title="true">session</var>, "<code><dom4ref name="notfounderror">NotFoundError</dom4ref></code>" and 0.</p></li>
                   <li><p>Abort the task.</p></li>
                 </ol>
               </li>
-              <li><p>Let <var title="true">session data</var> be the data stored for the <var title="true">sessionId</var>.</p></li>
+              <li><p>Let <var title="true">session data</var> be the data stored for the <var title="true">sessionId</var> in the <var title="true">origin</var>.
+              This must not include data from other origin(s) or that is not associated with an origin.</p></li>
               <li><p>Load the <var title="true">session data</var> and associate it with the <var title="true">session</var>.</p></li>
               <li><p>If a message exchange is required:</p>
                 <ol>