tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit a95923bb0f2f017c0a877a60bde95063950262b9
parent 481726ddcecaec27bd424e697f3b20d72ca0f2b1
Author: Georg Koppen <gk@torproject.org>
Date:   Wed, 29 May 2019 12:29:19 +0000

BB 30541: Disable WebGL readPixel() for web content

Related Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1428034

Diffstat:
Mdom/canvas/ClientWebGLContext.cpp | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/dom/canvas/ClientWebGLContext.cpp b/dom/canvas/ClientWebGLContext.cpp @@ -5502,6 +5502,14 @@ bool ClientWebGLContext::ReadPixels_SharedPrecheck( return false; } + // Security check passed, but don't let content readPixel calls through for + // now, if Resist Fingerprinting Mode is enabled. + if (ShouldResistFingerprinting(RFPTarget::CanvasRandomization)) { + JsWarning("readPixels: Not allowed in Resist Fingerprinting Mode"); + out_error.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR); + return false; + } + return true; }