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

Issue 96200: Restrict numeric whitelisting to nonnegative integers. (Closed)

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

Description

* Changed CajitaRewriter.java and Rule.java to whitelist expressions of the form @o[@s & -1 <<< 1] instead of @o[+@s] * Changed cajita.js to check that index > 0 when allowing numeric reads * Added tests to CajitaRewriterTest and domita_test_untrusted.html to check that neither Rhino nor the browser return anything but undefined on reading a negative index. * Updated structural tests in CajitaTest.java * Fixes bug 1093

Patch Set 1 #

Total comments: 7

Patch Set 2 : Restrict numeric whitelisting to nonnegative integers. #

Patch Set 3 : Restrict numeric whitelisting to nonnegative integers. #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+61 lines, -38 lines) Patch
M src/com/google/caja/cajita.js View 5 chunks +5 lines, -4 lines 2 comments Download
M src/com/google/caja/parser/quasiliteral/CajitaRewriter.java View 1 4 chunks +18 lines, -13 lines 2 comments Download
M src/com/google/caja/parser/quasiliteral/Rule.java View 1 2 chunks +4 lines, -7 lines 0 comments Download
M tests/com/google/caja/parser/quasiliteral/CajitaRewriterTest.java View 1 chunk +14 lines, -14 lines 0 comments Download
M tests/com/google/caja/plugin/domita_test_untrusted.html View 1 2 chunks +20 lines, -0 lines 0 comments Download

Messages

Total messages: 8
metaweta
16 years, 8 months ago (2009-07-31 02:56:35 UTC) #1
MikeSamuel
In the CL comment you say > 0 instead of >= 0. Cajita.js uses the ...
16 years, 8 months ago (2009-07-31 03:05:28 UTC) #2
MikeSamuel
Thanks for getting this out so quickly. http://codereview.appspot.com/96200/diff/1/6 File src/com/google/caja/parser/quasiliteral/CajitaRewriter.java (right): http://codereview.appspot.com/96200/diff/1/6#newcode1051 Line 1051: synopsis="Recognize ...
16 years, 8 months ago (2009-07-31 03:17:59 UTC) #3
metaweta
On 2009/07/31 03:17:59, MikeSamuel wrote: > Thanks for getting this out so quickly. Thanks for ...
16 years, 8 months ago (2009-07-31 15:56:04 UTC) #4
metaweta
On 2009/07/31 15:56:04, metaweta wrote: > > I think Ihab likes these tests to be ...
16 years, 8 months ago (2009-07-31 15:58:44 UTC) #5
MikeSamuel
LGTM http://codereview.appspot.com/96200/diff/18/1017 File src/com/google/caja/cajita.js (right): http://codereview.appspot.com/96200/diff/18/1017#newcode1377 Line 1377: if (typeof name === 'number' && name ...
16 years, 8 months ago (2009-07-31 22:16:21 UTC) #6
metaweta
On 2009/07/31 22:16:21, MikeSamuel wrote: > LGTM > > http://codereview.appspot.com/96200/diff/18/1017 > File src/com/google/caja/cajita.js (right): > ...
16 years, 8 months ago (2009-07-31 23:11:38 UTC) #7
metaweta
16 years, 8 months ago (2009-07-31 23:33:49 UTC) #8
@3625
Sign in to reply to this message.

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