Skip to content

Commit 1383b04

Browse files
progersfoolip
andauthored
Make privacy-preserving painting more concrete (#92)
Co-authored-by: Philip Jägenstedt <philip@foolip.org>
1 parent a0bdce3 commit 1383b04

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,15 +233,21 @@ A demo of the same thing using an experimental extension of [three.js](https://t
233233

234234
## Privacy-preserving painting
235235

236-
Both painting (via canvas pixel readbacks or timing attacks) and invalidation (via `onpaint`) have the potential to leak sensitive information, and this is prevented by excluding sensitive information when painting. While an exhaustive list cannot be enumerated, sensitive information includes:
236+
The `drawElementImage()` method and any other methods that draw element image snapshots, as well as the paint event, must not reveal any security- or privacy-sensitive information that isn't otherwise observable to author code.
237+
238+
Both painting (via canvas pixel readbacks or timing attacks) and invalidation (via `onpaint`) have the potential to leak sensitive information, and this is prevented by excluding sensitive information when painting and invalidating.
239+
240+
Sensitive information includes:
237241
* Cross-origin data in [embedded content](https://html.spec.whatwg.org/#embedded-content-category) (e.g., `<iframe>`, `<img>`), [`<url>`](https://drafts.csswg.org/css-values-4/#url-value) references (e.g., `background-image`, `clip-path`), and [SVG](https://svgwg.org/svg2-draft/single-page.html#types-InterfaceSVGURIReference) (e.g., `<use>`). Note that same-origin iframes would still paint, but cross-origin content in them would not.
238242
* System colors, themes, or preferences.
239243
* Spelling and grammar markers.
240-
* Search text (find-in-page) and text-fragment (fragment url) markers.
241244
* Visited link information.
242-
* Form autofill information not otherwise available to javascript.
245+
* Pending form autofill information not otherwise available to JavaScript.
243246

244-
SVG's `<foreignObject>` can be combined with data uri images and canvas to access the pixel data of HTML content ([example](https://jsfiddle.net/progers/qhawnyeu)), and implementations currently have mitigations to prevent leaking sensitive content. As an example, an `<input>` with a spelling error is still painted, but any indication of spelling errors, which could expose the user's spelling dictionary, is not painted. Similar mitigations should be used for `drawElementImage`, but need to be expanded to cover additional cases.
247+
The following new information is not considered sensitive:
248+
* Search text (find-in-page) and text-fragment (fragment url) markers.
249+
* Form element appearance.
250+
* Caret blink rate.
245251

246252
## Developer Trial (dev trial) Information
247253
The HTML-in-Canvas features may be enabled with [chrome://flags/#canvas-draw-element](chrome://flags/#canvas-draw-element) in Chrome Canary.

0 commit comments

Comments
 (0)