From 3f139512d0a15a031cc08e0d1a4e58aaac2c315a Mon Sep 17 00:00:00 2001 From: mwatson2 Date: Fri, 26 Aug 2016 12:45:14 -0400 Subject: [PATCH] Fix #87: Require JSON.parse to be executed in a clean global (#115) * Fix #88: Use a clean global object for conversion from object to JSON for JWK --- spec/Overview-WebCryptoAPI.xml | 9 +++++---- spec/Overview.html | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/spec/Overview-WebCryptoAPI.xml b/spec/Overview-WebCryptoAPI.xml index 4a55124..1dbeb98 100644 --- a/spec/Overview-WebCryptoAPI.xml +++ b/spec/Overview-WebCryptoAPI.xml @@ -775,8 +775,8 @@ of contents, section numbers, certain processing instructions).
  • Let result be the object literal that results from executing the - JSON.parse internal function, with text - argument set to a JavaScript String containing json. + JSON.parse internal function in the context of a new global object, + with text argument set to a JavaScript String containing json.

  • @@ -2395,7 +2395,8 @@ interface SubtleCrypto {
  • Convert key to an ECMAScript Object, as specified in [ - WebIDL]. + WebIDL], performing the conversion in the + context of a new global object.

  • @@ -2403,7 +2404,7 @@ interface SubtleCrypto { Let json be the result of representing key as a UTF-16 string conforming to the JSON grammar; for example, by executing the JSON.stringify algorithm specified in - ECMA262. + ECMA262 in the context of a new global object.

  • diff --git a/spec/Overview.html b/spec/Overview.html index 370b704..99bb21d 100644 --- a/spec/Overview.html +++ b/spec/Overview.html @@ -790,8 +790,8 @@

    9. Terminology

  • Let result be the object literal that results from executing the - JSON.parse internal function, with text - argument set to a JavaScript String containing json. + JSON.parse internal function in the context of a new global object, + with text argument set to a JavaScript String containing json.

  • @@ -2365,7 +2365,8 @@

    14.3.11. The wrapKey method

  • Convert key to an ECMAScript Object, as specified in [ - WebIDL]. + WebIDL], performing the conversion in the + context of a new global object.

  • @@ -2373,7 +2374,7 @@

    14.3.11. The wrapKey method

    Let json be the result of representing key as a UTF-16 string conforming to the JSON grammar; for example, by executing the JSON.stringify algorithm specified in - ECMA262. + ECMA262 in the context of a new global object.