Change cajita.js prepareModule to be more paranoid about what it exposes
to the Cajita programmer. We wish to preserve the invariant that the module
object exposed to Cajita is transitively immutable.
In the old way, the debugging information on top-level modules was not being
frozen, and was being copied into the module exposed to Cajita, thus serving
as a communication channel.
Jas, I made a bunch of changes here ... could you please look over this ...
16 years, 6 months ago
(2009-09-21 18:10:58 UTC)
#4
Jas, I made a bunch of changes here ... could you please look over this and
confirm LGTM?
The idea is to whitelist into module objects exposed to Cajita by the module
system only those properties of the "raw" Caja module literal that are
necessary, and ensure these properties do not provide a communication channel
(i.e., are transitively frozen).
http://codereview.appspot.com/115041/diff/4002/4004 File src/com/google/caja/cajita.js (right): http://codereview.appspot.com/115041/diff/4002/4004#newcode2716 Line 2716: setStatic(theModule, 'includedModules', ___.freeze(module.includedModules)); This is transitive freeze because ...
16 years, 6 months ago
(2009-09-21 20:43:40 UTC)
#6
Issue 115041: Make ___.prepareModule more paranoid
(Closed)
Created 16 years, 7 months ago by ihab.awad
Modified 16 years, 6 months ago
Reviewers: Jasvir, maoziqing
Base URL: http://google-caja.googlecode.com/svn/trunk/
Comments: 2