|
|
The so-called "Rosetta Flash" vulnerability is that allowing arbitrary
yet identifier-like text at the beginning of a JSONP response is
sufficient for it to be interpreted as a Flash file executing in that
origin. See for more information:
http://miki.it/blog/2014/7/8/abusing-jsonp-with-rosetta-flash/
All JSONP responses from Caja services now:
* are prefixed with "/**/", which still allows them to execute as JSONP
but removes requester control over the first bytes of the response.
* have the response header Content-Disposition: attachment.
Another recommended mitigation, "X-Content-Type-Options: nosniff", was
already present.
This change includes a backport of r5619 "Convert fetching proxy tests
to client-side tests." which was previously skipped, so as to simplify
applying the same fix to the ES5 branch.
Bug: <https://code.google.com/p/google-caja/issues/detail?id=1923>
@r5698
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+222 lines, -5 lines) |
Patch |
 |
M |
build.xml
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
src/com/google/caja/plugin/caja.js
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
src/com/google/caja/service/AbstractCajolingHandler.java
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
src/com/google/caja/service/CajolingServlet.java
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/plugin/browser-tests.json
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
A |
tests/com/google/caja/plugin/test-fetch-proxy.js
|
View
|
|
1 chunk |
+205 lines, -0 lines |
0 comments
|
Download
|
 |
A |
tests/com/google/caja/plugin/test-fetch-proxy-fixture.css
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
A |
tests/com/google/caja/plugin/test-fetch-proxy-fixture-unicode.ujs
|
View
|
|
Binary file |
0 comments
|
Download
|
 |
A |
tests/com/google/caja/plugin/test-fetch-proxy-fixture-unicode.ujs
|
View
|
1
|
Binary file |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/service/ProxyHandlerTest.java
|
View
|
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/service/ServiceTestCase.java
|
View
|
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
tests/com/google/caja/util/LocalServer.java
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
Total messages: 2
|