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

Issue 89073: fix 1057, class= attributes are too restrictive (Closed)

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

Description

1. <div class="!@#$%"></div> is valid html, and it was accepted by an earlier version of caja, but now it isn't. This change removes the constraint. This is important because some coders and libs use @class to store metadata about the node. 2. <input name="foo[]"> is not valid html, but it's commonly used, and browsers allow it. This change extends the range of allowed characters in ids, and adds a browser-expectations test to verify that browsers do not mangle weird ids. 3. browser-side sanitization didn't handle IDREFS attribute values correctly. This change fixes that. At the moment, IDREFS are not that useful, but they'll become more useful when the various aria attributes are supported. 4. cajoler-side sanitizer mangles GLOBAL_NAME attributes, but browser-side sanitizer doesn't. This change makes them both mangle. 5. browser-side and cajoler-side policies were inconsistent about whether <input name='foo__'> is allowed or not. This change removes the inconsistency. 6. some minor changes to jsunit.js to make it more convenient on various browsers.

Patch Set 1 #

Patch Set 2 : fix 1057, class= attributes are too restrictive #

Patch Set 3 : fix 1057, class= attributes are too restrictive #

Total comments: 7

Patch Set 4 : fix 1057, class= attributes are too restrictive #

Patch Set 5 : fix 1057, class= attributes are too restrictive #

Patch Set 6 : fix 1057, class= attributes are too restrictive #

Total comments: 13

Patch Set 7 : fix 1057, class= attributes are too restrictive #

Patch Set 8 : fix 1057, class= attributes are too restrictive #

Total comments: 4

Patch Set 9 : fix 1057, class= attributes are too restrictive #

Patch Set 10 : fix 1057, class= attributes are too restrictive #

Total comments: 11

Patch Set 11 : fix 1057, class= attributes are too restrictive #

Unified diffs Side-by-side diffs Delta from patch set Stats (+508 lines, -139 lines) Patch
M src/com/google/caja/plugin/domita.js View 2 3 4 5 6 7 8 9 10 9 chunks +99 lines, -86 lines 0 comments Download
M src/com/google/caja/plugin/templates/HtmlAttributeRewriter.java View 10 3 chunks +54 lines, -36 lines 0 comments Download
M tests/com/google/caja/browser-expectations.html View 9 10 9 chunks +80 lines, -2 lines 0 comments Download
M tests/com/google/caja/plugin/domita_test_untrusted.html View 2 3 4 5 6 7 8 9 10 2 chunks +74 lines, -0 lines 0 comments Download
M tests/com/google/caja/plugin/jsunit.js View 9 10 3 chunks +16 lines, -10 lines 0 comments Download
M tests/com/google/caja/plugin/templates/TemplateCompilerTest.java View 1 2 3 4 5 6 7 8 9 10 4 chunks +170 lines, -5 lines 0 comments Download
M tests/com/google/caja/plugin/templates/TemplateSanitizerTest.java View 9 10 1 chunk +11 lines, -0 lines 0 comments Download
M tests/com/google/caja/util/CajaTestCase.java View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 22
felix8a
16 years, 11 months ago (2009-07-01 17:53:19 UTC) #1
felix8a
16 years, 11 months ago (2009-07-01 23:03:17 UTC) #2
ihab.awad
http://codereview.appspot.com/89073/diff/10/1009 File src/com/google/caja/plugin/templates/TemplateCompiler.java (right): http://codereview.appspot.com/89073/diff/10/1009#newcode277 Line 277: if (!checkLegalSuffix(value, pos)) { return; } It would ...
16 years, 11 months ago (2009-07-06 22:27:53 UTC) #3
ihab.awad
http://codereview.appspot.com/89073/diff/10/1007 File tests/com/google/caja/plugin/templates/TemplateCompilerTest.java (right): http://codereview.appspot.com/89073/diff/10/1007#newcode302 Line 302: public void test1057ClassNames() throws Exception { Ah got ...
16 years, 11 months ago (2009-07-06 22:55:51 UTC) #4
felix8a
http://codereview.appspot.com/89073/diff/10/1009 File src/com/google/caja/plugin/templates/TemplateCompiler.java (right): http://codereview.appspot.com/89073/diff/10/1009#newcode392 Line 392: private boolean checkLegalSuffix(String value, FilePosition pos) { On ...
16 years, 11 months ago (2009-07-07 12:53:52 UTC) #5
ihab.awad
http://codereview.appspot.com/89073/diff/10/1009 File src/com/google/caja/plugin/templates/TemplateCompiler.java (right): http://codereview.appspot.com/89073/diff/10/1009#newcode392 Line 392: private boolean checkLegalSuffix(String value, FilePosition pos) { On ...
16 years, 11 months ago (2009-07-07 16:41:01 UTC) #6
felix8a
On 2009/07/07 16:41:01, ihab.awad wrote: > http://codereview.appspot.com/89073/diff/10/1009 > File src/com/google/caja/plugin/templates/TemplateCompiler.java (right): > > http://codereview.appspot.com/89073/diff/10/1009#newcode392 > ...
16 years, 11 months ago (2009-07-07 17:25:49 UTC) #7
felix8a
16 years, 11 months ago (2009-07-08 09:14:35 UTC) #8
ihab.awad
The diffs in the last patch set are *huge* and caused by MarkM's recent cajita.js ...
16 years, 11 months ago (2009-07-08 17:16:39 UTC) #9
felix8a
new snapshot
16 years, 11 months ago (2009-07-08 17:27:45 UTC) #10
felix8a
sorry, I need to snapshot again. I have an open bug that overlaps this in ...
16 years, 11 months ago (2009-07-09 07:52:06 UTC) #11
felix8a
16 years, 11 months ago (2009-07-09 07:52:27 UTC) #12
ihab.awad
A few comments -- will discuss further over chat and report back to the list. ...
16 years, 11 months ago (2009-07-09 19:18:51 UTC) #13
felix8a
ok, finally popped my stack enough. will re-snapshot. On 2009/07/09 19:18:51, ihab.awad wrote: > A ...
16 years, 10 months ago (2009-07-20 00:40:20 UTC) #14
ihab.awad
LGTM++ http://codereview.appspot.com/89073/diff/5006/6008 File src/com/google/caja/plugin/domita.js (right): http://codereview.appspot.com/89073/diff/5006/6008#newcode817 Line 817: } Peaches and cream. http://codereview.appspot.com/89073/diff/5006/6008#newcode2039 Line 2039: ...
16 years, 10 months ago (2009-07-20 21:19:42 UTC) #15
felix8a
new snapshot: simplified some code. added browser-expectations test for nonstandard id chars. allow some commonly ...
16 years, 10 months ago (2009-08-05 23:30:45 UTC) #16
MikeSamuel
On 2009/08/05 23:30:45, felix8a wrote: > new snapshot: > simplified some code. > added browser-expectations ...
16 years, 8 months ago (2009-09-17 15:32:22 UTC) #17
MikeSamuel
Ihab, do you mind if I take over as reviewer for this?
16 years, 8 months ago (2009-09-22 05:01:21 UTC) #18
MikeSamuel
Resending. Rietveld was misbehaving the first time I sent these, so I thought I'd retry ...
16 years, 8 months ago (2009-09-23 23:29:42 UTC) #19
felix8a
updated snapshot. http://codereview.appspot.com/89073/diff/10001/10008 File src/com/google/caja/plugin/domita.js (right): http://codereview.appspot.com/89073/diff/10001/10008#newcode817 Line 817: if (0 < n && str.substring(n) ...
16 years, 8 months ago (2009-09-24 20:49:58 UTC) #20
MikeSamuel
LGTM
16 years, 8 months ago (2009-09-24 21:15:07 UTC) #21
felix8a
16 years, 8 months ago (2009-09-24 21:17:10 UTC) #22
On 2009/09/24 21:15:07, MikeSamuel wrote:
> LGTM

@r3743
Sign in to reply to this message.

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