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

Issue 226460043: Virtualize <form> field names. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years ago by kpreid_google
Modified:
8 years, 3 months ago
Reviewers:
MarkM
CC:
caja-discuss-undisclosed_googlegroups.com, MarkM, felix8a, ihab.awad, Jasvir, kpreid2, metaweta, MikeSamuel
Base URL:
http://google-caja.googlecode.com/svn/branches/es53/
Visibility:
Public.

Description

Fixes <https://github.com/google/caja/issues/1371> a.k.a. <https://code.google.com/p/google-caja/issues/detail?id=1371>, which was recently found to be an actual problem. All attributes which act as the name of form fields get a new attribute type, FORM_FIELD_NAME. The cajoler and Domado virtualize the value of such attributes by adding a constant suffix. (Alternatively, we could reuse the idSuffix, but that makes the output of the cajoler more complex since it is non-constant.) Form submission is handled by temporarily removing the suffixes. This unfortunately is dangerous if script execution is interrupted and the suffixes are not restored, but no guest code runs in the critical section so it shouldn't be directly exploitable.

Patch Set 1 #

Patch Set 2 : Virtualize <form> field names. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+184 lines, -43 lines) Patch
M src/com/google/caja/lang/html/HTML.java View 1 1 chunk +6 lines, -1 line 0 comments Download
M src/com/google/caja/lang/html/HtmlDefinitions.java View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/com/google/caja/lang/html/html4-attributes.pl View 1 2 chunks +5 lines, -4 lines 0 comments Download
M src/com/google/caja/lang/html/html4-attributes-defs.json View 1 2 chunks +4 lines, -4 lines 0 comments Download
M src/com/google/caja/lang/html/html5-attributes-defs.json View 1 2 chunks +5 lines, -8 lines 0 comments Download
M src/com/google/caja/plugin/domado.js View 1 8 chunks +74 lines, -8 lines 0 comments Download
M src/com/google/caja/plugin/html-sanitizer.js View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/com/google/caja/plugin/html-sanitizer-legacy.js View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/com/google/caja/plugin/sanitizecss.js View 1 1 chunk +5 lines, -1 line 0 comments Download
M src/com/google/caja/plugin/templates/HtmlAttributeRewriter.java View 1 3 chunks +11 lines, -2 lines 0 comments Download
M tests/com/google/caja/plugin/browser-test-case.js View 1 1 chunk +3 lines, -0 lines 0 comments Download
M tests/com/google/caja/plugin/templates/TemplateCompilerTest.java View 1 1 chunk +4 lines, -3 lines 0 comments Download
M tests/com/google/caja/plugin/test-domado-forms-guest.html View 1 1 chunk +59 lines, -0 lines 0 comments Download
A + tests/com/google/caja/plugin/test-domado-forms-proxy.html View 1 2 chunks +5 lines, -12 lines 0 comments Download

Messages

Total messages: 5
kpreid_google
9 years ago (2015-04-18 22:59:57 UTC) #1
MarkM
LGTM
9 years ago (2015-04-19 16:28:16 UTC) #2
kpreid_google
Fixes <https://github.com/google/caja/issues/1371> a.k.a. <https://code.google.com/p/google-caja/issues/detail?id=1371>, which was recently found to be an actual problem. All attributes ...
9 years ago (2015-04-28 20:49:04 UTC) #3
kpreid_google
Turns out we actually do allow submit via .submit(). I misread the code. This new ...
9 years ago (2015-04-28 20:51:28 UTC) #4
MarkM
9 years ago (2015-04-28 20:58:59 UTC) #5
LGTM
Sign in to reply to this message.

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