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

Issue 1229046: Change signature of URI policy. (Closed)

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

Description

See the comments in UriPolicy.java. This changes the signature to use two enum values instead of a mime-type so that we can make finer grained distinctions. After this, next steps towards configurable UriPolicies specified in JS are (1) Make the loader type and uri effect visible from JS code. (2) Define a utility UriPolicy that is specified in terms of a JS object. (3) Change the command line runner and the sandbox so that there is a way to specify JS for one of these policies. Open questions: What in the sandbox proxy needs to change to deal with the new URL parameters. Submitted @4133

Patch Set 1 #

Patch Set 2 : Change signature of URI policy. #

Total comments: 2

Patch Set 3 : Change signature of URI policy. #

Patch Set 4 : Change signature of URI policy. #

Patch Set 5 : Change signature of URI policy. #

Patch Set 6 : Change signature of URI policy. #

Total comments: 4

Patch Set 7 : Change signature of URI policy. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+404 lines, -198 lines) Patch
M src/com/google/caja/demos/playground/server/GWTCajolingServiceImpl.java View 1 2 3 4 5 6 1 chunk +7 lines, -6 lines 0 comments Download
M src/com/google/caja/lang/html/HTML.java View 1 2 3 4 5 6 4 chunks +16 lines, -9 lines 0 comments Download
M src/com/google/caja/lang/html/HtmlSchema.java View 1 2 3 4 5 6 3 chunks +10 lines, -2 lines 0 comments Download
M src/com/google/caja/lang/html/html4-attributes.json View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M src/com/google/caja/lang/html/html4-attributes-defs.json View 1 2 3 4 5 6 8 chunks +62 lines, -24 lines 0 comments Download
M src/com/google/caja/lang/html/html4-attributes-whitelist.json View 1 2 3 4 5 6 2 chunks +5 lines, -3 lines 0 comments Download
M src/com/google/caja/plugin/BuildServiceImplementation.java View 1 2 3 4 5 6 1 chunk +12 lines, -11 lines 0 comments Download
M src/com/google/caja/plugin/CssRewriter.java View 1 2 3 4 5 6 11 chunks +25 lines, -14 lines 0 comments Download
M src/com/google/caja/plugin/CssValidator.java View 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/com/google/caja/plugin/FileSystemUriPolicy.java View 1 2 3 4 5 6 2 chunks +12 lines, -8 lines 0 comments Download
M src/com/google/caja/plugin/PluginCompilerMain.java View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M src/com/google/caja/plugin/PluginMeta.java View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/com/google/caja/plugin/UriPolicy.java View 1 2 3 4 5 6 2 chunks +77 lines, -10 lines 0 comments Download
A src/com/google/caja/plugin/UriPolicyHintKey.java View 1 chunk +58 lines, -0 lines 0 comments Download
M src/com/google/caja/plugin/templates/HtmlAttributeRewriter.java View 1 2 3 4 5 6 2 chunks +6 lines, -1 line 0 comments Download
M src/com/google/caja/service/GadgetHandler.java View 1 2 3 4 5 6 2 chunks +6 lines, -3 lines 0 comments Download
M src/com/google/caja/service/HtmlHandler.java View 1 2 3 4 5 6 2 chunks +6 lines, -3 lines 0 comments Download
M tests/com/google/caja/lang/html/HtmlSchemaTest.java View 1 2 3 4 5 6 2 chunks +14 lines, -3 lines 0 comments Download
M tests/com/google/caja/opensocial/DefaultGadgetRewriterTest.java View 1 2 3 4 5 6 4 chunks +6 lines, -14 lines 0 comments Download
D tests/com/google/caja/opensocial/example-dynamic-styles.xml View 1 2 3 4 5 6 1 chunk +0 lines, -16 lines 0 comments Download
D tests/com/google/caja/opensocial/example-dynamic-styles-rewritten.xml View 1 2 3 4 5 6 1 chunk +0 lines, -53 lines 0 comments Download
M tests/com/google/caja/opensocial/example-rewritten.xml View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M tests/com/google/caja/plugin/CssRewriterTest.java View 1 2 3 4 5 6 4 chunks +54 lines, -1 line 0 comments Download
M tests/com/google/caja/plugin/domita_test_untrusted.html View 5 6 3 chunks +8 lines, -6 lines 0 comments Download
M tests/com/google/caja/plugin/stages/PipelineStageTestCase.java View 1 2 3 4 5 6 2 chunks +6 lines, -3 lines 0 comments Download
M tests/com/google/caja/plugin/templates/TemplateCompilerTest.java View 1 2 3 4 5 6 3 chunks +7 lines, -2 lines 0 comments Download

Messages

Total messages: 9
MikeSamuel
14 years ago (2010-05-18 23:52:40 UTC) #1
MikeSamuel
ping
14 years ago (2010-05-25 21:56:53 UTC) #2
Jasvir
http://codereview.appspot.com/1229046/diff/3001/4023 File src/com/google/caja/demos/playground/server/GWTCajolingServiceImpl.java (right): http://codereview.appspot.com/1229046/diff/3001/4023#newcode74 src/com/google/caja/demos/playground/server/GWTCajolingServiceImpl.java:74: + "&loader=" + loader + "&effect=" + effect); Are ...
13 years, 11 months ago (2010-06-01 22:46:51 UTC) #3
Jasvir
My concern with this CL is the expressiveness of the uri policy language we're providing ...
13 years, 11 months ago (2010-06-01 23:12:20 UTC) #4
MikeSamuel
I created http://code.google.com/p/google-caja/wiki/UriPolicyExamples to capture examples.
13 years, 11 months ago (2010-06-01 23:24:11 UTC) #5
Jasvir
From the offline discussion, for future compatibility especially for the javascript API, the suggested api ...
13 years, 11 months ago (2010-06-04 20:29:36 UTC) #6
MikeSamuel
On 2010/06/04 20:29:36, jasvir wrote: > From the offline discussion, for future compatibility especially for ...
13 years, 11 months ago (2010-06-09 21:56:14 UTC) #7
Jasvir
LGTM http://codereview.appspot.com/1229046/diff/24001/25019 File src/com/google/caja/plugin/PluginMeta.java (right): http://codereview.appspot.com/1229046/diff/24001/25019#newcode33 src/com/google/caja/plugin/PluginMeta.java:33: this(UriFetcher.NULL_NETWORK, UriPolicy.BLANKET_DENY); DENY_ALL? http://codereview.appspot.com/1229046/diff/24001/25016 File src/com/google/caja/plugin/UriPolicy.java (right): http://codereview.appspot.com/1229046/diff/24001/25016#newcode95 ...
13 years, 11 months ago (2010-06-14 19:15:24 UTC) #8
MikeSamuel
13 years, 11 months ago (2010-06-16 03:26:10 UTC) #9
http://codereview.appspot.com/1229046/diff/24001/25019
File src/com/google/caja/plugin/PluginMeta.java (right):

http://codereview.appspot.com/1229046/diff/24001/25019#newcode33
src/com/google/caja/plugin/PluginMeta.java:33: this(UriFetcher.NULL_NETWORK,
UriPolicy.BLANKET_DENY);
On 2010/06/14 19:15:25, jasvir wrote:
> DENY_ALL?

Done.

http://codereview.appspot.com/1229046/diff/24001/25016
File src/com/google/caja/plugin/UriPolicy.java (right):

http://codereview.appspot.com/1229046/diff/24001/25016#newcode95
src/com/google/caja/plugin/UriPolicy.java:95: INTERPRETER,
renamed (INTERPRETER, MEDIA) to (UNSANDBOXED, SANDBOXED) and fleshed out the
comments.
Sign in to reply to this message.

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