W3C home > Mailing lists > Public > public-webcrypto@w3.org > February 2016

[Bug 29438] JSON.stringify as invoked by wrapKey can have side-effects depending on what you pass it

From: <bugzilla@jessica.w3.org>
Date: Tue, 09 Feb 2016 01:38:56 +0000
To: public-webcrypto@w3.org
Message-ID: <bug-29438-7213-T0NmyzOC1i@http.www.w3.org/Bugs/Public/>

--- Comment #2 from Boris Zbarsky <bzbarsky@mit.edu> ---
What Gecko does in practice right now is that it converts the dictionary to a
JS object in a new clean global, then does JSON.stringify on the result.  Since
the global has clean prototypes and none of the dictionary members in this case
have names that have any special meaning to the JSON.stringify algorithm this
works out to no observable effects, I believe...

Another option would be a modified version of JSON.stringify with
http://www.ecma-international.org/ecma-262/6.0/#sec-serializejsonproperty step
3 skipped.  I _think_ that this is sufficient to make things non-observable as
well, and equivalent to the clean-global approach.  Would need careful

You are receiving this mail because:
You are on the CC list for the bug.
Received on Tuesday, 9 February 2016 01:39:00 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 9 February 2016 01:39:00 UTC