Skip to content

Commit 99c90dd

Browse files
authored
Fix #363: setServerCertificate() should sanitize the input before providing it to the CDM (#402)
1 parent 7debbd4 commit 99c90dd

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

encrypted-media-respec.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1495,7 +1495,14 @@ <h2><a>MediaKeys</a> Interface</h2>
14951495
<li><p>Let <var>promise</var> be a new promise.</p></li>
14961496
<li><p>Run the following steps in parallel:</p>
14971497
<ol>
1498-
<li><p>Use this object's <var>cdm instance</var> to process <var>certificate</var>.</p></li>
1498+
<li><p>Let <var>sanitized certificate</var> be a validated and/or sanitized version of <var>certificate</var>.</p>
1499+
<p class="note">The user agent should thoroughly validate the certificate before passing it to the CDM.
1500+
This may include verifying values are within reasonable limits, stripping irrelevant data or fields, pre-parsing it, sanitizing it, and/or generating a fully sanitized version.
1501+
The user agent should check that the length and values of fields are reasonable.
1502+
Unknown fields should be rejected or removed.
1503+
</p>
1504+
</li>
1505+
<li><p>Use this object's <var>cdm instance</var> to process <var>sanitized certificate</var>.</p></li>
14991506
<li><p>If the preceding step failed, resolve <var>promise</var> with <a def-id="new-domexception-named"></a> <a def-id="appropriate-error-name"></a>.</p></li>
15001507
<li><p>Resolve <var>promise</var> with <code>true</code>.</p></li>
15011508
</ol>

0 commit comments

Comments
 (0)