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

Issue 202140043: Make taming membrane distrust Object.prototype.toString. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 2 months ago by kpreid_google
Modified:
9 years, 2 months ago
Reviewers:
MarkM
CC:
google-caja-discuss_googlegroups.com
Base URL:
http://google-caja.googlecode.com/svn/trunk/
Visibility:
Public.

Description

The taming membrane uses Object.prototype.toString to detect builtin objects (Date, Float32Array, etc.) and copy them across the membrane as the same type. ES6 allows objects to change their "toStringTag", thus making this spoofable. Therefore, harden each special copy case so that if the toString result is spoofed, the membrane cannot be punctured. Also fixed some ineffective tests in test-taming-inout-guest.js. @r5710

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -18 lines) Patch
M src/com/google/caja/plugin/taming-membrane.js View 3 chunks +47 lines, -14 lines 0 comments Download
M tests/com/google/caja/plugin/test-taming-inout-guest.js View 2 chunks +4 lines, -4 lines 1 comment Download

Messages

Total messages: 4
kpreid_google
9 years, 2 months ago (2015-02-18 22:56:28 UTC) #1
MarkM
Do you intend to fix cajaTamingGoogleLoader in a separate CL? Or did you conclude it ...
9 years, 2 months ago (2015-02-18 23:20:53 UTC) #2
kpreid_google
On 2015/02/18 23:20:53, MarkM wrote: > Do you intend to fix cajaTamingGoogleLoader in a separate ...
9 years, 2 months ago (2015-02-18 23:36:26 UTC) #3
MarkM
9 years, 2 months ago (2015-02-18 23:37:45 UTC) #4
LGTM
Sign in to reply to this message.

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