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

Issue 33640043: remove css-history-sniff defense code (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 3 months ago by felix8a
Modified:
12 years, 3 months ago
Reviewers:
kpreid2
CC:
google-caja-discuss_googlegroups.com
Base URL:
http://google-caja.googlecode.com/svn/branches/es53/
Visibility:
Public.

Description

Modern browsers all implement history-sniff protection in basically the same way Caja does, so this CL deletes the code in Caja. This CL is for the es53 branch, because the java css sanitizer is deleted in trunk. I'll port this to trunk in a separate CL. css-stylesheet-tests.js has some error messages added. This is because I moved an assertNoErrors() statement in CssRewriterTest. Previously, CssRewriterTest only checked error messages if css-stylesheet-tests declared a "messages" element. I felt uncomfortable about swallowing unexpected errors, so I modified it to always check errors, whether or not "messages" is specified. test-domado-special-guest had a testcase that checks that history sniffing doesn't work. In principle, we could keep this test and check the browser's history-sniffing defense. In practice, this was a really complicated change, because the imaginary computed style returned by Caja was nontrivially different from the imaginary computed style returned by browsers. After spending too long trying to fix the test, I decided to just delete it instead, since it's not really checking Caja code.

Patch Set 1 #

Total comments: 9

Patch Set 2 : remove css-history-sniff defense code #

Unified diffs Side-by-side diffs Delta from patch set Stats (+178 lines, -680 lines) Patch
M src/com/google/caja/lang/css/CssPropBit.java View 1 chunk +2 lines, -9 lines 0 comments Download
M src/com/google/caja/lang/css/CssPropertyPatterns.java View 3 chunks +0 lines, -12 lines 0 comments Download
M src/com/google/caja/plugin/CssRewriter.java View 7 chunks +11 lines, -251 lines 0 comments Download
D src/com/google/caja/plugin/LinkStyleWhitelist.java View 1 chunk +0 lines, -47 lines 0 comments Download
M src/com/google/caja/plugin/domado.js View 1 4 chunks +7 lines, -26 lines 0 comments Download
M src/com/google/caja/plugin/sanitizecss.js View 1 13 chunks +18 lines, -109 lines 0 comments Download
M tests/com/google/caja/plugin/CssRewriterTest.java View 1 chunk +1 line, -1 line 0 comments Download
M tests/com/google/caja/plugin/css-stylesheet-tests.js View 8 chunks +102 lines, -65 lines 0 comments Download
M tests/com/google/caja/plugin/sanitizecss_test.js View 1 7 chunks +37 lines, -37 lines 0 comments Download
M tests/com/google/caja/plugin/test-domado-special-guest.html View 1 chunk +0 lines, -101 lines 0 comments Download
M tests/com/google/caja/plugin/test-domado-special-initial-state.html View 3 chunks +0 lines, -22 lines 0 comments Download

Messages

Total messages: 7
felix8a
12 years, 3 months ago (2013-11-27 04:27:38 UTC) #1
kpreid2
https://codereview.appspot.com/33640043/diff/1/src/com/google/caja/lang/css/CssPropBit.java File src/com/google/caja/lang/css/CssPropBit.java (right): https://codereview.appspot.com/33640043/diff/1/src/com/google/caja/lang/css/CssPropBit.java#newcode33 src/com/google/caja/lang/css/CssPropBit.java:33: // 32 is an obsolete flag HISTORY_INSENSITIVE Please add ...
12 years, 3 months ago (2013-11-27 17:46:09 UTC) #2
felix8a
Modern browsers all implement history-sniff protection in basically the same way Caja does, so this ...
12 years, 3 months ago (2013-11-28 03:15:32 UTC) #3
felix8a
new snapshot https://codereview.appspot.com/33640043/diff/1/src/com/google/caja/lang/css/CssPropBit.java File src/com/google/caja/lang/css/CssPropBit.java (right): https://codereview.appspot.com/33640043/diff/1/src/com/google/caja/lang/css/CssPropBit.java#newcode33 src/com/google/caja/lang/css/CssPropBit.java:33: // 32 is an obsolete flag HISTORY_INSENSITIVE ...
12 years, 3 months ago (2013-11-28 03:16:15 UTC) #4
kpreid2
LGTM https://codereview.appspot.com/33640043/diff/1/src/com/google/caja/lang/css/CssPropBit.java File src/com/google/caja/lang/css/CssPropBit.java (right): https://codereview.appspot.com/33640043/diff/1/src/com/google/caja/lang/css/CssPropBit.java#newcode33 src/com/google/caja/lang/css/CssPropBit.java:33: // 32 is an obsolete flag HISTORY_INSENSITIVE On ...
12 years, 3 months ago (2013-11-28 03:23:22 UTC) #5
felix8a
https://codereview.appspot.com/33640043/diff/1/src/com/google/caja/lang/css/CssPropBit.java File src/com/google/caja/lang/css/CssPropBit.java (right): https://codereview.appspot.com/33640043/diff/1/src/com/google/caja/lang/css/CssPropBit.java#newcode33 src/com/google/caja/lang/css/CssPropBit.java:33: // 32 is an obsolete flag HISTORY_INSENSITIVE On 2013/11/28 ...
12 years, 3 months ago (2013-11-28 03:25:54 UTC) #6
felix8a
12 years, 3 months ago (2013-11-28 05:48:26 UTC) #7
@r5641 on es53 branch
@r5642 on trunk
Sign in to reply to this message.

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