[tor-commits] [tor-browser] 30/67: Bug 30541: Disable WebGL readPixel() for web content

gitolite role git at cupani.torproject.org
Wed May 4 20:44:48 UTC 2022


This is an automated email from the git hooks/post-receive script.

richard pushed a commit to branch geckoview-96.0.3-11.0-1
in repository tor-browser.

commit ad43da7a7a4db69fef7ace6a465b04f4c5906d2c
Author: Georg Koppen <gk at torproject.org>
AuthorDate: Wed May 29 12:29:19 2019 +0000

    Bug 30541: Disable WebGL readPixel() for web content
---
 dom/canvas/ClientWebGLContext.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/dom/canvas/ClientWebGLContext.cpp b/dom/canvas/ClientWebGLContext.cpp
index 4b5e0287ee9e0..d1d63f4ac953a 100644
--- a/dom/canvas/ClientWebGLContext.cpp
+++ b/dom/canvas/ClientWebGLContext.cpp
@@ -4673,6 +4673,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 (nsContentUtils::ResistFingerprinting(aCallerType)) {
+    JsWarning("readPixels: Not allowed in Resist Fingerprinting Mode");
+    out_error.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
+    return false;
+  }
+
   return true;
 }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tor-commits mailing list