Skip to content

Commit

Permalink
Fix #87: Require JSON.parse to be executed in a clean global (#115)
Browse files Browse the repository at this point in the history

* Fix #88: Use a clean global object for conversion from object to JSON for JWK
  • Loading branch information
mwatson2 authored Aug 26, 2016
1 parent 87c77ea commit 3f13951
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions spec/Overview-WebCryptoAPI.xml
Original file line number Diff line number Diff line change
Expand Up @@ -775,8 +775,8 @@ of contents, section numbers, certain processing instructions).
<li>
<p>
Let <var>result</var> be the object literal that results from executing the
<code>JSON.parse</code> internal function, with <code>text</code>
argument set to a JavaScript String containing <var>json</var>.
<code>JSON.parse</code> internal function in the context of a new global object,
with <code>text</code> argument set to a JavaScript String containing <var>json</var>.
</p>
</li>
<li>
Expand Down Expand Up @@ -2395,15 +2395,16 @@ interface <dfn id="dfn-SubtleCrypto">SubtleCrypto</dfn> {
<li>
<p>
Convert <var>key</var> to an ECMAScript Object, as specified in [
<a href="#WebIDL">WebIDL</a>].
<a href="#WebIDL">WebIDL</a>], performing the conversion in the
context of a new global object.
</p>
</li>
<li>
<p>
Let <var>json</var> be the result of representing <var>key</var> as a
UTF-16 string conforming to the JSON grammar; for example, by executing
the <code>JSON.stringify</code> algorithm specified in
<a href="#ECMA-262">ECMA262</a>.
<a href="#ECMA-262">ECMA262</a> in the context of a new global object.
</p>
</li>
<li>
Expand Down
9 changes: 5 additions & 4 deletions spec/Overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -790,8 +790,8 @@ <h2>9. Terminology</h2>
<li>
<p>
Let <var>result</var> be the object literal that results from executing the
<code>JSON.parse</code> internal function, with <code>text</code>
argument set to a JavaScript String containing <var>json</var>.
<code>JSON.parse</code> internal function in the context of a new global object,
with <code>text</code> argument set to a JavaScript String containing <var>json</var>.
</p>
</li>
<li>
Expand Down Expand Up @@ -2365,15 +2365,16 @@ <h4>14.3.11. The wrapKey method</h4>
<li>
<p>
Convert <var>key</var> to an ECMAScript Object, as specified in [
<a href="#WebIDL">WebIDL</a>].
<a href="#WebIDL">WebIDL</a>], performing the conversion in the
context of a new global object.
</p>
</li>
<li>
<p>
Let <var>json</var> be the result of representing <var>key</var> as a
UTF-16 string conforming to the JSON grammar; for example, by executing
the <code>JSON.stringify</code> algorithm specified in
<a href="#ECMA-262">ECMA262</a>.
<a href="#ECMA-262">ECMA262</a> in the context of a new global object.
</p>
</li>
<li>
Expand Down

0 comments on commit 3f13951

Please sign in to comment.