|
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.
|
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
|
Total messages: 5
|