Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(367)

Issue 7134050: Fixes issue 1623. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 4 months ago by MarkM
Modified:
11 years, 3 months ago
Reviewers:
Mark S. Miller, kpreid2
CC:
caja-discuss-undisclosed_googlegroups.com, MarkM, felix8a, ihab.awad, Jasvir, metaweta, MikeSamuel, kpreid2
Base URL:
http://google-caja.googlecode.com/svn/trunk/
Visibility:
Public.

Description

In def, we call tamperProof on val before recuring on its property descriptor. But tamper-proof, due to http://wiki.ecmascript.org/doku.php?id=strawman:fixing_override_mistake , replaces configurable own data properties on prototypical objects with getters/setters. The traversal which happens *afterwards* correctly does not invoke the getter, but rather recurs on the getter and setter functions themselves. The fix is to recur before calling tamperProof. However, this would leave the new getters and setters themselves unfrozen. This fix also enhances tamperProof to take an optional function argument for cleaning these new accessor functions. This CL provides freeze as the cleaning function for now, but really we want to first remove all own properties from these function instances not allowed by the whitelist.

Patch Set 1 #

Total comments: 4

Patch Set 2 : Fixes issue 1623. #

Total comments: 4

Patch Set 3 : Fixes issue 1623. #

Patch Set 4 : Fixes issue 1623. #

Patch Set 5 : Fixes issue 1623. #

Patch Set 6 : Fixes issue 1623. #

Patch Set 7 : Fixes issue 1623. #

Patch Set 8 : Fixes issue 1623. #

Total comments: 2

Patch Set 9 : Fixes issue 1623. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+125 lines, -92 lines) Patch
M src/com/google/caja/ses/repairES5.js View 1 2 3 4 5 6 7 11 chunks +101 lines, -58 lines 0 comments Download
M src/com/google/caja/ses/startSES.js View 1 2 3 4 5 6 7 8 1 chunk +24 lines, -34 lines 0 comments Download

Messages

Total messages: 24
MarkM
11 years, 4 months ago (2013-01-17 02:41:43 UTC) #1
kpreid2
https://codereview.appspot.com/7134050/diff/1/src/com/google/caja/ses/repairES5.js File src/com/google/caja/ses/repairES5.js (right): https://codereview.appspot.com/7134050/diff/1/src/com/google/caja/ses/repairES5.js#newcode431 src/com/google/caja/ses/repairES5.js:431: var cleanNewAccessor = opt_cleanNewAccessor || function(f) { unnecessary function-expression ...
11 years, 4 months ago (2013-01-17 02:53:33 UTC) #2
MarkM
https://codereview.appspot.com/7134050/diff/1/src/com/google/caja/ses/startSES.js File src/com/google/caja/ses/startSES.js (right): https://codereview.appspot.com/7134050/diff/1/src/com/google/caja/ses/startSES.js#newcode834 src/com/google/caja/ses/startSES.js:834: tamperProof(val, cleanNewAccessor); On 2013/01/17 02:53:33, kpreid2 wrote: > Isn't ...
11 years, 4 months ago (2013-01-17 05:56:57 UTC) #3
MarkM
In def, we call tamperProof on val before recuring on its property descriptor. But tamper-proof, ...
11 years, 3 months ago (2013-01-20 19:12:48 UTC) #4
MarkM
new snapshot
11 years, 3 months ago (2013-01-21 20:05:12 UTC) #5
kpreid2
https://codereview.appspot.com/7134050/diff/5001/src/com/google/caja/ses/repairES5.js File src/com/google/caja/ses/repairES5.js (right): https://codereview.appspot.com/7134050/diff/5001/src/com/google/caja/ses/repairES5.js#newcode436 src/com/google/caja/ses/repairES5.js:436: var i, j, name; // crockford rule two spaces ...
11 years, 3 months ago (2013-01-21 20:49:27 UTC) #6
MarkM
In def, we call tamperProof on val before recuring on its property descriptor. But tamper-proof, ...
11 years, 3 months ago (2013-01-21 21:05:46 UTC) #7
MarkM
new snapshot
11 years, 3 months ago (2013-01-21 21:06:35 UTC) #8
kpreid2
LGTM
11 years, 3 months ago (2013-01-21 22:46:19 UTC) #9
MarkM
In def, we call tamperProof on val before recuring on its property descriptor. But tamper-proof, ...
11 years, 3 months ago (2013-01-22 03:44:20 UTC) #10
MarkM
In def, we call tamperProof on val before recuring on its property descriptor. But tamper-proof, ...
11 years, 3 months ago (2013-01-23 02:14:25 UTC) #11
MarkM
New snapshot. Kevin, please apply your freezeness test On Mon, Jan 21, 2013 at 2:46 ...
11 years, 3 months ago (2013-01-23 02:18:26 UTC) #12
kpreid2
On 2013/01/23 02:18:26, MarkM wrote: > New snapshot. Kevin, please apply your freezeness test I ...
11 years, 3 months ago (2013-01-23 19:38:46 UTC) #13
MarkM
Great, thanks. Felix, as far as I'm concerned, fire when ready ;) On Wed, Jan ...
11 years, 3 months ago (2013-01-23 20:21:57 UTC) #14
MarkM
In def, we call tamperProof on val before recuring on its property descriptor. But tamper-proof, ...
11 years, 3 months ago (2013-02-02 23:31:19 UTC) #15
MarkM
In def, we call tamperProof on val before recuring on its property descriptor. But tamper-proof, ...
11 years, 3 months ago (2013-02-03 06:16:01 UTC) #16
MarkM
New snapshot. The getter installed by tamperProof now simply does "return value;". This makes http://5238.caja.appspot.com/?es5=true#http://www.thinkfu.com/jq-minimal.htmlsignificantly ...
11 years, 3 months ago (2013-02-03 06:20:54 UTC) #17
MarkM
In def, we call tamperProof on val before recuring on its property descriptor. But tamper-proof, ...
11 years, 3 months ago (2013-02-03 06:23:29 UTC) #18
kpreid2
https://codereview.appspot.com/7134050/diff/27002/src/com/google/caja/ses/startSES.js File src/com/google/caja/ses/startSES.js (right): https://codereview.appspot.com/7134050/diff/27002/src/com/google/caja/ses/startSES.js#newcode829 src/com/google/caja/ses/startSES.js:829: defendingStack = []; missing rethrow
11 years, 3 months ago (2013-02-04 18:02:49 UTC) #19
kpreid2
On 2013/02/03 06:20:54, MarkM wrote: > New snapshot. > > The getter installed by tamperProof ...
11 years, 3 months ago (2013-02-04 18:17:07 UTC) #20
MarkM
In def, we call tamperProof on val before recuring on its property descriptor. But tamper-proof, ...
11 years, 3 months ago (2013-02-04 21:44:02 UTC) #21
MarkM
https://codereview.appspot.com/7134050/diff/27002/src/com/google/caja/ses/startSES.js File src/com/google/caja/ses/startSES.js (right): https://codereview.appspot.com/7134050/diff/27002/src/com/google/caja/ses/startSES.js#newcode829 src/com/google/caja/ses/startSES.js:829: defendingStack = []; On 2013/02/04 18:02:49, kpreid2 wrote: > ...
11 years, 3 months ago (2013-02-04 21:45:31 UTC) #22
kpreid2
LGTM
11 years, 3 months ago (2013-02-05 00:42:50 UTC) #23
Mark S. Miller
11 years, 3 months ago (2013-02-05 02:00:46 UTC) #24
Thanks for the LGTM. Since this is in responsible disclosure, I'm leaving
it to Felix to do the actual commit.


On Mon, Feb 4, 2013 at 4:42 PM, <kpreid.switchb.org@gmail.com> wrote:

> LGTM
>
>
>
https://codereview.appspot.**com/7134050/<https://codereview.appspot.com/7134...
>
> --
> --
> ---You received this message because you are subscribed to the Google
> Groups "caja-discuss-undisclosed" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
caja-discuss-undisclosed+**unsubscribe@googlegroups.com<caja-discuss-undisclo...
> .
> For more options, visit
https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/o...
> .
>
>
>


-- 
    Cheers,
    --MarkM
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b